fix: Client.getChatById(): Cannot read properties of undefined (reading '_serialized') (#2225)
* fix: Cannot read properties of undefined (reading '_serialized') * Update supported WhatsApp Web version to v2.2321.6 * Revert "Update WhatsApp Web Version (2.2321.6)" --------- Co-authored-by: guicuton <guicuton@users.noreply.github.com> Co-authored-by: Rajeh Taher <rajeh@reforward.dev> Co-authored-by: Shir Serlui <70711723+shirser121@users.noreply.github.com>
This commit is contained in:
parent
d959645bc3
commit
41e59efa72
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue