diff --git a/src/structures/Broadcast.js b/src/structures/Broadcast.js index eb7f97765f..b74483b920 100644 --- a/src/structures/Broadcast.js +++ b/src/structures/Broadcast.js @@ -43,7 +43,7 @@ class Broadcast extends Base { * Messages statuses * @type {Message[]} */ - this.msgs = data.msgs.map(msg => new Message(this.client, msg)); + this.msgs = data.msgs?.map(msg => new Message(this.client, msg)); return super._patch(data); } diff --git a/src/util/Injected/Utils.js b/src/util/Injected/Utils.js index 6052627fde..9012ba0b8e 100644 --- a/src/util/Injected/Utils.js +++ b/src/util/Injected/Utils.js @@ -1015,9 +1015,8 @@ exports.LoadUtils = () => { }; window.WWebJS.getStatusModel = status => { - let res = status.serialize(); + const res = status.serialize(); delete res._msgs; - res.msgs = status._msgs.map(msg => window.WWebJS.getMessageModel(msg)); return res; };