fix: don't patch set data with undefined (#6694)

This commit is contained in:
Rodry
2021-10-03 13:59:52 +01:00
committed by GitHub
parent 8b4456e0aa
commit 9eb9591473
33 changed files with 1211 additions and 795 deletions

View File

@@ -71,9 +71,9 @@ class Message extends Base {
* @type {?boolean}
*/
this.system = SystemMessageTypes.includes(this.type);
} else if (typeof this.type !== 'string') {
this.system = null;
this.type = null;
} else {
this.system ??= null;
this.type ??= null;
}
if ('content' in data) {