Skip to content

Commit

Permalink
fix(PermissionOverwrites): throw better error if resolving option fai…
Browse files Browse the repository at this point in the history
…ls (#6219)
  • Loading branch information
SpaceEEC committed Jul 29, 2021
1 parent be5c0ef commit 42a0313
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/structures/PermissionOverwrites.js
Expand Up @@ -118,14 +118,14 @@ class PermissionOverwrites extends Base {

for (const [perm, value] of Object.entries(options)) {
if (value === true) {
allow.add(Permissions.FLAGS[perm]);
deny.remove(Permissions.FLAGS[perm]);
allow.add(perm);
deny.remove(perm);
} else if (value === false) {
allow.remove(Permissions.FLAGS[perm]);
deny.add(Permissions.FLAGS[perm]);
allow.remove(perm);
deny.add(perm);
} else if (value === null) {
allow.remove(Permissions.FLAGS[perm]);
deny.remove(Permissions.FLAGS[perm]);
allow.remove(perm);
deny.remove(perm);
}
}

Expand Down

0 comments on commit 42a0313

Please sign in to comment.