mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix(Message): handle undefined/null content in cleanContent getter (#3778)
* Handle undefined/null content in Message#cleanContent * Typings * Update typings/index.d.ts Co-Authored-By: SpaceEEC <spaceeec@yahoo.com> Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
This commit is contained in:
@@ -301,7 +301,8 @@ class Message extends Base {
|
||||
* @readonly
|
||||
*/
|
||||
get cleanContent() {
|
||||
return Util.cleanContent(this.content, this);
|
||||
// eslint-disable-next-line eqeqeq
|
||||
return this.content != null ? Util.cleanContent(this.content, this) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user