Skip to content

Commit

Permalink
fix(Message): Ensure channel is defined for clean content (#10681)
Browse files Browse the repository at this point in the history
fix(Message): ensure channel is defined for clean content

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
Jiralite and kodiakhq[bot] committed Jan 4, 2025
1 parent 7280d4e commit 46bf8f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/discord.js/src/structures/Message.js
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ class Message extends Base {
*/
get cleanContent() {
// eslint-disable-next-line eqeqeq
return this.content != null ? cleanContent(this.content, this.channel) : null;
return this.content != null && this.channel ? cleanContent(this.content, this.channel) : null;
}

/**
Expand Down

0 comments on commit 46bf8f0

Please sign in to comment.