From 4f7241e96bf191c3000490602a5badfd6afa0be8 Mon Sep 17 00:00:00 2001 From: Surat Das Date: Thu, 19 Aug 2021 18:19:52 -0700 Subject: [PATCH] Stop the progress bar on performing operation for unauthorized user. Addresses issue https://github.com/Visual-Regression-Tracker/Visual-Regression-Tracker/issues/296 --- src/components/TestRunList/BulkOperation.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/TestRunList/BulkOperation.tsx b/src/components/TestRunList/BulkOperation.tsx index a1b43294..e1f1795b 100644 --- a/src/components/TestRunList/BulkOperation.tsx +++ b/src/components/TestRunList/BulkOperation.tsx @@ -204,11 +204,12 @@ export const BulkOperation: React.FunctionComponent = () => { variant: "success", }); }) - .catch((err) => + .catch((err) => { + setIsProcessing(false); enqueueSnackbar(err, { variant: "error", - }) - ); + }); + }); closeModal(); }} />