mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-07 11:22:35 +01:00
🐛 fix bitfield resolve
This commit is contained in:
parent
a0fced26a1
commit
8acb247bcd
@ -135,7 +135,7 @@ export class BitField {
|
||||
if (Array.isArray(bit)) {
|
||||
// @ts-ignore
|
||||
const resolve = this.constructor?.resolve || this.resolve;
|
||||
return bit.map((p) => resolve(p)).reduce((prev, p) => BigInt(prev) | BigInt(p), 0n);
|
||||
return bit.map((p) => resolve.call(this, p)).reduce((prev, p) => BigInt(prev) | BigInt(p), 0n);
|
||||
}
|
||||
if (typeof bit === "string" && typeof FLAGS[bit] !== "undefined") return FLAGS[bit];
|
||||
throw new RangeError("BITFIELD_INVALID: " + bit);
|
||||
|
Loading…
Reference in New Issue
Block a user