fix(conversation-list): prevent error when setting unread count by checking item index

This commit is contained in:
Abhinav Raut
2025-06-07 19:58:45 +05:30
parent ade833fb7b
commit 28dcd6cb2f
+3 -1
View File
@@ -209,7 +209,9 @@ export const useConversationStore = defineStore('conversation', () => {
const index = conversations.data.findIndex(conv => conv.uuid === uuid)
if (index !== -1) {
setTimeout(() => {
conversations.data[index].unread_message_count = 0
if (conversations.data?.[index]) {
conversations.data[index].unread_message_count = 0
}
}, 3000)
}
}