Merge pull request #314 from ONLYOFFICE/bugfix/files-unblock

Bugfix/files unblock
This commit is contained in:
Ilya Oleshko 2021-08-03 15:48:21 +03:00 committed by GitHub
commit 70dedbedb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,8 +18,9 @@ export default function withBadges(WrappedComponent) {
const { item, lockFileAction, isAdmin } = this.props;
const { locked, id, access } = item;
if (!isAdmin || !access === 0) return;
lockFileAction(id, !locked).catch((err) => toastr.error(err));
if (isAdmin || access === 0)
return lockFileAction(id, !locked).catch((err) => toastr.error(err));
return;
};
onClickFavorite = () => {