From 984d92238880c00b040ae1a4aed98a7a948e000e Mon Sep 17 00:00:00 2001 From: Dmitry Sychugov Date: Mon, 16 Aug 2021 15:48:07 +0500 Subject: [PATCH] Web: Files: correct download cancellation --- products/ASC.Files/Client/src/HOCs/withBadges.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/products/ASC.Files/Client/src/HOCs/withBadges.js b/products/ASC.Files/Client/src/HOCs/withBadges.js index db292aa946..e0c4dec024 100644 --- a/products/ASC.Files/Client/src/HOCs/withBadges.js +++ b/products/ASC.Files/Client/src/HOCs/withBadges.js @@ -21,8 +21,8 @@ export default function withBadges(WrappedComponent) { if (isAdmin || access === 0) { setIsLoading(true); return lockFileAction(id, !locked) - .then(() => setIsLoading(false)) - .catch((err) => toastr.error(err)); + .catch((err) => toastr.error(err)) + .finally(() => setIsLoading(false)); } return; };