mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
perf: use logical assignments instead of if statements (#6693)
This commit is contained in:
@@ -248,7 +248,7 @@ class GuildMemberManager extends CachedManager {
|
||||
_data.channel_id = null;
|
||||
_data.channel = undefined;
|
||||
}
|
||||
if (_data.roles) _data.roles = _data.roles.map(role => (role instanceof Role ? role.id : role));
|
||||
_data.roles &&= _data.roles.map(role => (role instanceof Role ? role.id : role));
|
||||
let endpoint = this.client.api.guilds(this.guild.id);
|
||||
if (id === this.client.user.id) {
|
||||
const keys = Object.keys(_data);
|
||||
|
||||
Reference in New Issue
Block a user