fix: msgs not appearing in chat

This commit is contained in:
Adhiraj Singh
2022-11-03 21:30:05 +05:30
parent f1635e2de7
commit 5e28d23460
+1 -1
View File
@@ -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 }]
}