From 17515d760a4d247eb3dd61b4e281344abe86c453 Mon Sep 17 00:00:00 2001 From: gopienkonikita Date: Tue, 5 Oct 2021 10:41:15 +0300 Subject: [PATCH] Fixed Bug 52940 - Client.Files. Fixed display of the "download as" button in the context menu --- .../ASC.Files/Client/src/store/FilesStore.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/products/ASC.Files/Client/src/store/FilesStore.js b/products/ASC.Files/Client/src/store/FilesStore.js index e4964d7db5e..1af715c1877 100644 --- a/products/ASC.Files/Client/src/store/FilesStore.js +++ b/products/ASC.Files/Client/src/store/FilesStore.js @@ -1298,7 +1298,13 @@ class FilesStore { other: [], }; - for (let item of this.selection) { + const selection = this.selection.length + ? this.selection + : this.bufferSelection + ? [this.bufferSelection] + : []; + + for (let item of selection) { item.checked = true; item.format = null; @@ -1362,7 +1368,13 @@ class FilesStore { get isWebEditSelected() { const { filesConverts } = this.formatsStore.docserviceStore; - return this.selection.some((selected) => { + const selection = this.selection.length + ? this.selection + : this.bufferSelection + ? [this.bufferSelection] + : []; + + return selection.some((selected) => { if (selected.isFolder === true || !selected.fileExst) return false; const index = filesConverts.findIndex((f) => f[selected.fileExst]); return index !== -1;