Skip to content

Commit

Permalink
fix permissions not resolving correctly (#1928)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdistin authored and amishshah committed Sep 10, 2017
1 parent 3767b35 commit 98b81fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util/Permissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class Permissions {
let total = 0;
for (let p = permissions.length - 1; p >= 0; p--) {
const perm = this.constructor.resolve(permissions[p]);
if ((this.bitfield & perm) !== perm) total |= perm;
total |= perm;
}
if (Object.isFrozen(this)) return new this.constructor(this.bitfield | total);
this.bitfield |= total;
Expand All @@ -73,7 +73,7 @@ class Permissions {
let total = 0;
for (let p = permissions.length - 1; p >= 0; p--) {
const perm = this.constructor.resolve(permissions[p]);
if ((this.bitfield & perm) === perm) total |= perm;
total |= perm;
}
if (Object.isFrozen(this)) return new this.constructor(this.bitfield & ~total);
this.bitfield &= ~total;
Expand Down

0 comments on commit 98b81fa

Please sign in to comment.