mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 18:13:29 +01: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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user