fix(guildchannelmanager): edit always sets parent to null (#7446)

This commit is contained in:
muchnameless
2022-02-12 10:21:06 +01:00
committed by GitHub
parent 298b22604b
commit b97aedd8e1

View File

@@ -240,7 +240,7 @@ class GuildChannelManager extends CachedManager {
channel = this.resolve(channel);
if (!channel) throw new TypeError('INVALID_TYPE', 'channel', 'GuildChannelResolvable');
const parent = this.client.channels.resolveId(data.parent);
const parent = data.parent && this.client.channels.resolveId(data.parent);
if (typeof data.position !== 'undefined') await this.setPosition(channel, data.position, { reason });