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:
parent
b029889f27
commit
4ef54f1bc2
3 changed files with 3 additions and 3 deletions
|
@ -37,8 +37,8 @@ export default {
|
||||||
update(label)
|
update(label)
|
||||||
},
|
},
|
||||||
removeLabelById(state, label) {
|
removeLabelById(state, label) {
|
||||||
delete state.labels[label.id]
|
|
||||||
remove(label)
|
remove(label)
|
||||||
|
delete state.labels[label.id]
|
||||||
},
|
},
|
||||||
setLoaded(state, loaded) {
|
setLoaded(state, loaded) {
|
||||||
state.loaded = loaded
|
state.loaded = loaded
|
||||||
|
|
|
@ -23,8 +23,8 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
removeListById(state, list) {
|
removeListById(state, list) {
|
||||||
delete state[list.id]
|
|
||||||
remove(list)
|
remove(list)
|
||||||
|
delete state[list.id]
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
|
|
|
@ -55,8 +55,8 @@ export default {
|
||||||
removeNamespaceById(state, namespaceId) {
|
removeNamespaceById(state, namespaceId) {
|
||||||
for (const n in state.namespaces) {
|
for (const n in state.namespaces) {
|
||||||
if (state.namespaces[n].id === namespaceId) {
|
if (state.namespaces[n].id === namespaceId) {
|
||||||
state.namespaces.splice(n, 1)
|
|
||||||
remove(state.namespaces[n])
|
remove(state.namespaces[n])
|
||||||
|
state.namespaces.splice(n, 1)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue