Skip to content

Commit 46bf8f0

Browse files
fix(Message): Ensure channel is defined for clean content (#10681)
fix(Message): ensure channel is defined for clean content Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 7280d4e commit 46bf8f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/discord.js/src/structures/Message.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ class Message extends Base {
590590
*/
591591
get cleanContent() {
592592
// eslint-disable-next-line eqeqeq
593-
return this.content != null ? cleanContent(this.content, this.channel) : null;
593+
return this.content != null && this.channel ? cleanContent(this.content, this.channel) : null;
594594
}
595595

596596
/**

0 commit comments

Comments
 (0)