From ae429cfa5a26dd97ef351b9445c936810697b1a5 Mon Sep 17 00:00:00 2001 From: Timo Date: Tue, 4 May 2021 17:23:01 +0300 Subject: [PATCH] removed dld bttn for empty project --- .../buttons/file-download-btn/file-download-btn.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/red-ui/src/app/modules/shared/components/buttons/file-download-btn/file-download-btn.component.ts b/apps/red-ui/src/app/modules/shared/components/buttons/file-download-btn/file-download-btn.component.ts index 4e51ddda5..a185664fe 100644 --- a/apps/red-ui/src/app/modules/shared/components/buttons/file-download-btn/file-download-btn.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/buttons/file-download-btn/file-download-btn.component.ts @@ -29,7 +29,7 @@ export class FileDownloadBtnComponent { get canDownloadFiles() { if (Array.isArray(this.file)) { - return this.file.reduce((acc, file) => acc && this._permissionsService.canDownloadRedactedFile(file), true); + return this.file.length > 0 && this.file.reduce((acc, file) => acc && this._permissionsService.canDownloadRedactedFile(file), true); } else { return this._permissionsService.canDownloadRedactedFile(this.file); }