Skip to content

Commit

Permalink
UIBULKED-312: fix duplicate
Browse files Browse the repository at this point in the history
  • Loading branch information
UladzislauKutarkin committed Sep 11, 2023
1 parent d9ce48d commit 9322657
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ const BulkEditManualUploadModal = ({
setCurrentStep(MANUAL_UPLOAD_STEPS.CONFIRM);
};

const handleCancel = () => {
const handleCancel = (isCancel = true) => {
if (controller.current) controller.current.abort();
if (fileName) bulkOperationDelete({ operationId });
if (fileName && isCancel) bulkOperationDelete({ operationId });

setCurrentStep(MANUAL_UPLOAD_STEPS.UPLOAD);
setFileName('');
Expand All @@ -112,9 +112,7 @@ const BulkEditManualUploadModal = ({
} catch {
swwCallout(swwErrorMessage);
} finally {
setCurrentStep(MANUAL_UPLOAD_STEPS.UPLOAD);
setFileName('');
onCancel();
handleCancel(false);
}
};

Expand Down

0 comments on commit 9322657

Please sign in to comment.