Merge pull request #100 from invalidCards/fix-bitfield-has

fix(BitField): resolve the bit before checking
This commit is contained in:
DjDeveloper 2021-02-02 08:53:55 +05:30 committed by GitHub
commit 3828a6b911
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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[] {