Pranav Raj S
2023-06-08 20:12:14 -07:00
committed by GitHub
parent 7fd220c177
commit c8fac08e0b
2 changed files with 12 additions and 5 deletions

View File

@@ -58,11 +58,10 @@ export const mutations = {
}
},
[types.SET_ALL_ATTACHMENTS](_state, { id, data }) {
if (data.length) {
const [chat] = _state.allConversations.filter(c => c.id === id);
Vue.set(chat, 'attachments', []);
chat.attachments.push(...data);
}
const [chat] = _state.allConversations.filter(c => c.id === id);
if (!chat) return;
Vue.set(chat, 'attachments', []);
chat.attachments.push(...data);
},
[types.SET_MISSING_MESSAGES](_state, { id, data }) {
const [chat] = _state.allConversations.filter(c => c.id === id);