From 73292a5405a016be298744d3d4de0861a24d7dac Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Thu, 25 Apr 2024 15:48:54 +0530 Subject: [PATCH] aic --- web/apps/photos/src/services/upload/uploadManager.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/web/apps/photos/src/services/upload/uploadManager.ts b/web/apps/photos/src/services/upload/uploadManager.ts index 4f8486f933..69487ee0d9 100644 --- a/web/apps/photos/src/services/upload/uploadManager.ts +++ b/web/apps/photos/src/services/upload/uploadManager.ts @@ -401,9 +401,7 @@ class UploadManager { mediaFiles as ClusterableFile[], ); - if (uploadCancelService.isUploadCancelationRequested()) { - throw Error(CustomError.UPLOAD_CANCELLED); - } + this.abortIfCancelled(); this.uiService.setFilenames( new Map( @@ -531,9 +529,8 @@ class UploadManager { const uiService = this.uiService; while (this.filesToBeUploaded.length > 0) { - if (uploadCancelService.isUploadCancelationRequested()) { - throw Error(CustomError.UPLOAD_CANCELLED); - } + this.abortIfCancelled(); + let fileWithCollection = this.filesToBeUploaded.pop(); const { collectionID } = fileWithCollection; const collection = this.collections.get(collectionID);