Fix removing a namespace not removing it from the list

This commit is contained in:
kolaente 2021-01-08 23:03:40 +01:00
parent 98feedfcd3
commit 35ef66744b
Signed by untrusted user who does not match committer: konrad
GPG key ID: F40E70337AB24C9B
2 changed files with 10 additions and 1 deletions

View file

@ -41,6 +41,14 @@ export default {
addNamespace(state, namespace) {
state.namespaces.push(namespace)
},
removeNamespaceById(state, namespaceId) {
for (const n in state.namespaces) {
if (state.namespaces[n].id === namespaceId) {
state.namespaces.splice(n, 1)
return
}
}
},
addListToNamespace(state, list) {
for (const n in state.namespaces) {
if (state.namespaces[n].id === list.namespaceId) {