From 26b15b2b78280c596235c0ce4a4e87d2419c0629 Mon Sep 17 00:00:00 2001 From: Adhiraj Singh Date: Tue, 29 Dec 2020 11:09:21 +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 2af1226..b287963 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)) {