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-12 23:07:34 +01:00
committed by GitHub
co-authored by SpaceEEC
parent 878cc050d4
commit a36f3869b3
+2 -1
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;
}
/**