fix(Message): Ensure channel is defined for clean content

#10681 djs
This commit is contained in:
Elysia
2025-01-21 02:17:11 +07:00
parent 3a0d5745ea
commit f0d3584a2a

View File

@@ -550,7 +550,7 @@ class Message extends Base {
*/
get cleanContent() {
// eslint-disable-next-line eqeqeq
return this.content != null ? Util.cleanContent(this.content, this.channel) : null;
return this.content != null && this.channel ? Util.cleanContent(this.content, this.channel) : null;
}
/**