Web: Files: fixed finalizeVersionAction

This commit is contained in:
Nikita Gopienko 2022-06-16 12:03:47 +03:00
parent a98e5d9c6a
commit 8c8bef2418

View File

@ -598,13 +598,15 @@ class FilesActionStore {
}; };
finalizeVersionAction = (id) => { finalizeVersionAction = (id) => {
const { fetchFiles, setIsLoading } = this.filesStore; const { setFile, setIsLoading } = this.filesStore;
setIsLoading(true); setIsLoading(true);
return finalizeVersion(id, 0, false) return finalizeVersion(id, 0, false)
.then(() => { .then((res) => {
fetchFiles(this.selectedFolderStore.id, this.filesStore.filter); if (res && res[0]) {
setFile(res[0]);
}
}) })
.finally(() => setIsLoading(false)); .finally(() => setIsLoading(false));
}; };