Merge pull request #374 from ONLYOFFICE/bugfix/Bug-52940

Fixed Bug 52940 - Client.Files. Fixed display of the "download as" bu…
This commit is contained in:
Alexey Safronov 2021-10-05 12:44:37 +03:00 committed by GitHub
commit 2ae932ebbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;