feat: remove usage of .last

This commit is contained in:
Shivam Mishra
2026-04-23 14:44:52 +05:30
parent 190416d765
commit 83e96956fc
6 changed files with 2 additions and 26 deletions
@@ -181,7 +181,7 @@ const actions = {
);
if (!selectedChat) return;
const { messages } = selectedChat;
const lastMessage = messages.last();
const lastMessage = messages[messages.length - 1];
if (!lastMessage) return;
commit(types.SET_LAST_MESSAGE_ID_IN_SYNC_CONVERSATION, {
conversationId,