From a7d51f9831050750db46f89febf90de7c7f26637 Mon Sep 17 00:00:00 2001 From: Adhiraj Singh Date: Fri, 27 Nov 2020 19:52:34 +0530 Subject: [PATCH] possible undefined jid fix --- src/WAConnection/4.Events.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WAConnection/4.Events.ts b/src/WAConnection/4.Events.ts index 1e30d2d..a52ec7e 100644 --- a/src/WAConnection/4.Events.ts +++ b/src/WAConnection/4.Events.ts @@ -49,7 +49,7 @@ export class WAConnection extends Base { if (oldChat.t !== chat.t || oldChat.modify_tag !== chat.modify_tag) { const changes = shallowChanges (oldChat, chat) delete changes.messages - updatedChats.push({ jid: chat.jid, ...changes }) + updatedChats.push({ ...changes, jid: chat.jid }) } } })