From f37442c3511dfafbf1c298d66edf766029b43417 Mon Sep 17 00:00:00 2001 From: MattIPv4 Date: Fri, 11 Jun 2021 23:29:39 +0100 Subject: [PATCH 1/2] fix(GuildChannel): don't force parentID/permissionOverwrites to empty on create --- src/structures/GuildChannel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index 1d28714ae25d..c4e80e117b79 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -36,8 +36,8 @@ class GuildChannel extends Channel { */ this.guild = guild; - this.parentID = null; - this.permissionOverwrites = new Collection(); + this.parentID = this.parentID || null; + this.permissionOverwrites = this.permissionOverwrites || new Collection(); } _patch(data) { From 9aa1b1705d58bc5aebc7544577f2d0b1f46a0332 Mon Sep 17 00:00:00 2001 From: MattIPv4 Date: Fri, 11 Jun 2021 23:49:19 +0100 Subject: [PATCH 2/2] fix(GuildChannel): use nullish op --- src/structures/GuildChannel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index c4e80e117b79..422dad94abef 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -36,8 +36,8 @@ class GuildChannel extends Channel { */ this.guild = guild; - this.parentID = this.parentID || null; - this.permissionOverwrites = this.permissionOverwrites || new Collection(); + this.parentID = this.parentID ?? null; + this.permissionOverwrites = this.permissionOverwrites ?? new Collection(); } _patch(data) {