Skip to content

Commit

Permalink
fix(GuildChannel): clone errors when options.name isn't provided (#5804)
Browse files Browse the repository at this point in the history
  • Loading branch information
PoroUsedSnax committed Jun 11, 2021
1 parent 53d8e49 commit 41673b7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/structures/GuildChannel.js
Expand Up @@ -582,8 +582,7 @@ class GuildChannel extends Channel {
* @returns {Promise<GuildChannel>}
*/
clone(options = {}) {
return this.guild.channels.create(options.name, {
name: this.name,
return this.guild.channels.create(options.name ?? this.name, {
permissionOverwrites: this.permissionOverwrites,
topic: this.topic,
type: this.type,
Expand Down

0 comments on commit 41673b7

Please sign in to comment.