Skip to content

Commit

Permalink
Merge pull request #314 from ONLYOFFICE/bugfix/files-unblock
Browse files Browse the repository at this point in the history
Bugfix/files unblock
  • Loading branch information
ilyaoleshko authored Aug 3, 2021
2 parents b927f16 + d25ddb0 commit 70dedbe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions products/ASC.Files/Client/src/HOCs/withBadges.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand Down

0 comments on commit 70dedbe

Please sign in to comment.