mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 11:33:30 +01:00
fix(guildchannelmanager): edit always sets parent to null (#7446)
This commit is contained in:
@@ -240,7 +240,7 @@ class GuildChannelManager extends CachedManager {
|
|||||||
channel = this.resolve(channel);
|
channel = this.resolve(channel);
|
||||||
if (!channel) throw new TypeError('INVALID_TYPE', 'channel', 'GuildChannelResolvable');
|
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 });
|
if (typeof data.position !== 'undefined') await this.setPosition(channel, data.position, { reason });
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user