mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
Clean up and simplify some code
This commit is contained in:
@@ -239,12 +239,12 @@ class GuildChannel extends Channel {
|
||||
this.name === channel.name;
|
||||
|
||||
if (equal) {
|
||||
if (channel.permission_overwrites) {
|
||||
const thisIDSet = Array.from(this.permissionOverwrites.keys());
|
||||
const otherIDSet = channel.permission_overwrites.map(overwrite => overwrite.id);
|
||||
if (this.permissionOverwrites && channel.permissionOverwrites) {
|
||||
const thisIDSet = this.permissionOverwrites.keyArray();
|
||||
const otherIDSet = channel.permissionOverwrites.keyArray();
|
||||
equal = arraysEqual(thisIDSet, otherIDSet);
|
||||
} else {
|
||||
equal = false;
|
||||
equal = !this.permissionOverwrites && !channel.permissionOverwrites;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user