fix: lists disappearing when updating their namespace
This commit is contained in:
parent
1bc6d66895
commit
77f8b27dc6
1 changed files with 6 additions and 2 deletions
|
@ -14,11 +14,15 @@ export default {
|
|||
},
|
||||
setNamespaceById(state, namespace) {
|
||||
const namespaceIndex = state.namespaces.findIndex(n => n.id === namespace.id)
|
||||
|
||||
|
||||
if (namespaceIndex === -1) {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
if (!namespace.lists || namespace.lists.length === 0) {
|
||||
namespace.lists = state.namespaces[namespaceIndex].lists
|
||||
}
|
||||
|
||||
Vue.set(state.namespaces, namespaceIndex, namespace)
|
||||
},
|
||||
setListInNamespaceById(state, list) {
|
||||
|
|
Loading…
Reference in a new issue