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:
Ryan Munro
2020-02-13 09:07:34 +11:00
committed by GitHub
parent 878cc050d4
commit a36f3869b3

View File

@@ -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;
}
/**