Skip to content

Commit

Permalink
[ML] Fix loading spinner of latency correlations chart when cancel wa…
Browse files Browse the repository at this point in the history
…s hit before retrieving any data.
  • Loading branch information
walterra committed Aug 26, 2021
1 parent cd871b2 commit f4c3c5f
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ export const useTransactionLatencyCorrelationsFetcher = () => {
abortCtrl.current.abort();
setFetchState((prevState) => ({
...prevState,
// If we didn't receive data for the overall histogram yet
// set it to an empty array to indicate loading stopped.
...(prevState.overallHistogram === undefined
? { overallHistogram: [] }
: {}),
isRunning: false,
}));
}, [setFetchState]);
Expand Down

0 comments on commit f4c3c5f

Please sign in to comment.