Skip to content

Commit

Permalink
Web: Files: Fixed memory leak.
Browse files Browse the repository at this point in the history
  • Loading branch information
TatianaLopaeva committed Nov 3, 2021
1 parent d55bf01 commit 70bdfa5
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ class SharingPanelComponent extends React.Component {
isLoading: true,
},
function () {
this.onClose();
setShareFiles(
folderIds,
fileIds,
Expand Down Expand Up @@ -219,7 +218,10 @@ class SharingPanelComponent extends React.Component {
})
.then(() => onSuccess && onSuccess())
.catch((err) => toastr.error(err))
.finally(() => this.setState({ isLoading: false }));
.finally(() => {
this.setState({ isLoading: false });
this.onClose();
});
}
);
};
Expand Down

0 comments on commit 70bdfa5

Please sign in to comment.