From 4ef54f1bc24fc39c8c3c223af08ba9fabdfe349c Mon Sep 17 00:00:00 2001 From: kolaente Date: Mon, 22 Nov 2021 21:49:19 +0100 Subject: [PATCH] fix: deleting a namespace Deleting a namespace would remove the item from the store and then try to remove it from the search index. That failed because the item was already removed from the store and thus undefined when it was passed to the store. --- src/store/modules/labels.js | 2 +- src/store/modules/lists.js | 2 +- src/store/modules/namespaces.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/store/modules/labels.js b/src/store/modules/labels.js index d00948125..24ad50c47 100644 --- a/src/store/modules/labels.js +++ b/src/store/modules/labels.js @@ -37,8 +37,8 @@ export default { update(label) }, removeLabelById(state, label) { - delete state.labels[label.id] remove(label) + delete state.labels[label.id] }, setLoaded(state, loaded) { state.loaded = loaded diff --git a/src/store/modules/lists.js b/src/store/modules/lists.js index 375defde3..faab53c04 100644 --- a/src/store/modules/lists.js +++ b/src/store/modules/lists.js @@ -23,8 +23,8 @@ export default { }) }, removeListById(state, list) { - delete state[list.id] remove(list) + delete state[list.id] }, }, getters: { diff --git a/src/store/modules/namespaces.js b/src/store/modules/namespaces.js index 86d08c35d..ae47a95f8 100644 --- a/src/store/modules/namespaces.js +++ b/src/store/modules/namespaces.js @@ -55,8 +55,8 @@ export default { removeNamespaceById(state, namespaceId) { for (const n in state.namespaces) { if (state.namespaces[n].id === namespaceId) { - state.namespaces.splice(n, 1) remove(state.namespaces[n]) + state.namespaces.splice(n, 1) return } }