Merge pull request #100 from invalidCards/fix-bitfield-has
fix(BitField): resolve the bit before checking
This commit is contained in:
commit
3828a6b911
1 changed files with 2 additions and 1 deletions
|
@ -27,7 +27,8 @@ export class BitField {
|
|||
|
||||
has(bit: BitFieldResolvable, ...args: any[]): boolean {
|
||||
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[] {
|
||||
|
|
Loading…
Reference in a new issue