Skip to content

Commit 7f54af0

Browse files
fix: handle undefined channelMetadata to prevent crash (#127094)
* 💥 fix(Channel): handle undefined channelMetadata to prevent crash * Update Channel.js * Update Channel.js * Update Channel.js Co-authored-by: @BenyFilho * Update Channel.js Co-authored-by: @BenyFilho * Update Channel.js Co-authored-by: @BenyFilho * Update Channel.js Co-authored-by: @BenyFilho * Update Channel.js Co-authored-by: * fix: update description in Channel.js co-authored-by: @BenyFilho --------- Co-authored-by: BenyFilho <168232825+BenyFilho@users.noreply.github.com>
1 parent 016a56b commit 7f54af0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/structures/Channel.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ class Channel extends Base {
4141
* The channel description
4242
* @type {string}
4343
*/
44-
this.description = data.channelMetadata.description;
44+
this.description =
45+
data.channelMetadata?.description ?? data.description ?? '';
4546

4647
/**
4748
* Indicates if it is a Channel

0 commit comments

Comments
 (0)