From 1e8d758363006a9f81ffe6c241aec57247aa89d9 Mon Sep 17 00:00:00 2001 From: Morchip Date: Fri, 9 Nov 2018 14:26:16 +0100 Subject: [PATCH] fix duplicate file in queue --- projects/ngx-uploader/src/lib/ngx-uploader.class.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/ngx-uploader/src/lib/ngx-uploader.class.ts b/projects/ngx-uploader/src/lib/ngx-uploader.class.ts index c7d2ce4d..037480cf 100644 --- a/projects/ngx-uploader/src/lib/ngx-uploader.class.ts +++ b/projects/ngx-uploader/src/lib/ngx-uploader.class.ts @@ -70,7 +70,7 @@ export class NgUploaderService { } break; case 'uploadAll': - const files = this.queue.filter(file => file.progress.status === UploadStatus.Queue); + const files = this.queue.filter(file => file.progress.status === UploadStatus.Queue && !this.subs.find((f) => f.id === file.id)); files.forEach(file => this.uploadScheduler.next({ file: file, event: event })); break; case 'cancel':