mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00:00
fix(BitField): remove for..in in favor of Object.entries (#3650)
* fix(BitField): remove for..in in favor of Object.keys * refactor: do not re-resolve bits Co-Authored-By: bdistin <bdistin@gmail.com> Co-authored-by: bdistin <bdistin@gmail.com>
This commit is contained in:
parent
59205a2152
commit
11f9118551
1 changed files with 1 additions and 1 deletions
|
|
@ -103,7 +103,7 @@ class BitField {
|
|||
*/
|
||||
serialize(...hasParams) {
|
||||
const serialized = {};
|
||||
for (const perm in this.constructor.FLAGS) serialized[perm] = this.has(perm, ...hasParams);
|
||||
for (const [flag, bit] of Object.entries(this.constructor.FLAGS)) serialized[flag] = this.has(bit, ...hasParams);
|
||||
return serialized;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue