From 5e28d2346078cf7d101e5ce1792589d3b90ccb6d Mon Sep 17 00:00:00 2001 From: Adhiraj Singh Date: Thu, 3 Nov 2022 21:30:05 +0530 Subject: [PATCH] fix: msgs not appearing in chat --- src/Utils/history.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Utils/history.ts b/src/Utils/history.ts index 6e76f95..b56a395 100644 --- a/src/Utils/history.ts +++ b/src/Utils/history.ts @@ -51,7 +51,7 @@ export const processHistoryMessage = (item: proto.IHistorySync) => { const message = item.message! messages.push(message) - if(!chat.messages) { + if(!chat.messages?.length) { // keep only the most recent message in the chat array chat.messages = [{ message }] }