Skip to content

Commit

Permalink
fix(guildchannelmanager): edit always sets parent to null (#7446)
Browse files Browse the repository at this point in the history
  • Loading branch information
muchnameless committed Feb 12, 2022
1 parent 298b226 commit b97aedd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/discord.js/src/managers/GuildChannelManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });

Expand Down

0 comments on commit b97aedd

Please sign in to comment.