diff --git a/src/util/Injected.js b/src/util/Injected.js index 86d56ed..da8fb2f 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -475,7 +475,7 @@ exports.LoadUtils = () => { res.lastMessage = null; if (res.msgs && res.msgs.length) { - const lastMessage = window.Store.Msg.get(chat.lastReceivedKey._serialized); + const lastMessage = chat.lastReceivedKey ? window.Store.Msg.get(chat.lastReceivedKey._serialized) : null; if (lastMessage) { res.lastMessage = window.WWebJS.getMessageModel(lastMessage); }