fix(BitField): resolve the bit before checking
This commit is contained in:
parent
dbb80f30b4
commit
96bba8d68e
1 changed files with 2 additions and 1 deletions
|
@ -27,7 +27,8 @@ export class BitField {
|
||||||
|
|
||||||
has(bit: BitFieldResolvable, ...args: any[]): boolean {
|
has(bit: BitFieldResolvable, ...args: any[]): boolean {
|
||||||
if (Array.isArray(bit)) return (bit.every as any)((p: any) => this.has(p))
|
if (Array.isArray(bit)) return (bit.every as any)((p: any) => this.has(p))
|
||||||
return (this.bitfield & BitField.resolve(this.flags, bit)) === bit
|
bit = BitField.resolve(this.flags, bit);
|
||||||
|
return (this.bitfield & bit) === bit
|
||||||
}
|
}
|
||||||
|
|
||||||
missing(bits: any, ...hasParams: any[]): string[] {
|
missing(bits: any, ...hasParams: any[]): string[] {
|
||||||
|
|
Loading…
Reference in a new issue