Skip to content

Commit

Permalink
Apply bdistin suggested change to both methods
Browse files Browse the repository at this point in the history
  • Loading branch information
monbrey authored and SpaceEEC committed Sep 9, 2019
1 parent 1d01a14 commit 60dc981
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/util/Permissions.js
Expand Up @@ -25,8 +25,7 @@ class Permissions extends BitField {
* @returns {boolean}
*/
any(permission, checkAdmin = true) {
if (checkAdmin && super.has(this.constructor.FLAGS.ADMINISTRATOR)) return true;
return super.any(permission);
return (checkAdmin && super.has(this.constructor.FLAGS.ADMINISTRATOR)) || super.any(permission);
}

/**
Expand All @@ -36,8 +35,7 @@ class Permissions extends BitField {
* @returns {boolean}
*/
has(permission, checkAdmin = true) {
if (checkAdmin && super.has(this.constructor.FLAGS.ADMINISTRATOR)) return true;
return super.has(permission);
return (checkAdmin && super.has(this.constructor.FLAGS.ADMINISTRATOR)) || super.has(permission);
}
}

Expand Down

0 comments on commit 60dc981

Please sign in to comment.