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.
This commit is contained in:
kolaente 2021-11-22 21:49:19 +01:00
parent b029889f27
commit 4ef54f1bc2
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B
3 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -23,8 +23,8 @@ export default {
})
},
removeListById(state, list) {
delete state[list.id]
remove(list)
delete state[list.id]
},
},
getters: {

View file

@ -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
}
}