mirror of
https://github.com/abhinavxd/libredesk.git
synced 2026-09-24 19:32:10 +00:00
fix(conversation-list): prevent error when setting unread count by checking item index
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user