Fixed bug 57697 - Web: Files: added delay for requesting a folder if is viewer mode

This commit is contained in:
Dmitry Sychugov 2022-06-27 13:54:45 +05:00
parent 5df5469005
commit 9ec801e233

View File

@ -67,6 +67,7 @@ class PureHome extends React.Component {
const pathname = window.location.href;
const fileId = pathname.slice(pathname.indexOf("#preview") + 9);
setTimeout(() => {
getFileInfo(fileId)
.then((data) => {
const canOpenPlayer = isMediaOrImage(data.fileExst);
@ -77,6 +78,7 @@ class PureHome extends React.Component {
toastr.error(err);
this.fetchDefaultFiles();
});
}, 1);
return;
}