From 17f66f6f9b110cd8820dc019bd1508d4fb4611fc Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Thu, 10 Oct 2024 16:47:54 +0530 Subject: [PATCH] fix: Cannot read properties of null (reading 'id') --- app/javascript/dashboard/store/modules/contacts/mutations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/dashboard/store/modules/contacts/mutations.js b/app/javascript/dashboard/store/modules/contacts/mutations.js index 8984b37d7..41a763be9 100644 --- a/app/javascript/dashboard/store/modules/contacts/mutations.js +++ b/app/javascript/dashboard/store/modules/contacts/mutations.js @@ -49,7 +49,7 @@ export const mutations = { [types.DELETE_CONTACT]: ($state, id) => { const index = $state.sortOrder.findIndex(item => item === id); $state.sortOrder.splice(index, 1); - $state.records[id] = null; + delete $state.records[id]; }, [types.UPDATE_CONTACTS_PRESENCE]: ($state, data) => {