From 3d6418e9d60e1642d577a08ddf53b6481f05f17a Mon Sep 17 00:00:00 2001 From: Adhiraj Singh Date: Tue, 29 Dec 2020 11:05:23 +0530 Subject: [PATCH] Update 7.MessagesExtra.ts --- src/WAConnection/7.MessagesExtra.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WAConnection/7.MessagesExtra.ts b/src/WAConnection/7.MessagesExtra.ts index 01825c4..2af1226 100644 --- a/src/WAConnection/7.MessagesExtra.ts +++ b/src/WAConnection/7.MessagesExtra.ts @@ -114,7 +114,7 @@ export class WAConnection extends Base { const chat = this.chats.get (jid) const hasCursor = cursor?.id && typeof cursor?.fromMe !== 'undefined' - const cursorValue = hasCursor && chat.messages.get (GET_MESSAGE_ID(cursor)) + const cursorValue = hasCursor && chat.messages?.get (GET_MESSAGE_ID(cursor)) let messages: WAMessage[] if (chat?.messages && mostRecentFirst && (!hasCursor || cursorValue)) {