chore: simplify tenary
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
kolaente 2021-11-13 17:02:57 +01:00
parent 329b1cd646
commit 66eafd6ac9
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 19 additions and 15 deletions

View File

@ -122,25 +122,29 @@ export default {
const {list} = this.parsedQuery
lists = list === null ? [] : (allLists.filter(l => {
if (typeof l === 'undefined' || l === null) {
return false
}
if (list === null) {
lists = []
} else {
lists = allLists.filter(l => {
if (typeof l === 'undefined' || l === null) {
return false
}
if (l.isArchived) {
return false
}
if (l.isArchived) {
return false
}
if (typeof ncache[l.namespaceId] === 'undefined') {
ncache[l.namespaceId] = this.$store.getters['namespaces/getNamespaceById'](l.namespaceId)
}
if (typeof ncache[l.namespaceId] === 'undefined') {
ncache[l.namespaceId] = this.$store.getters['namespaces/getNamespaceById'](l.namespaceId)
}
if (ncache[l.namespaceId].isArchived) {
return false
}
if (ncache[l.namespaceId].isArchived) {
return false
}
return l.title.toLowerCase().includes(list.toLowerCase())
}) ?? [])
return l.title.toLowerCase().includes(list.toLowerCase())
}) ?? []
}
}
const cmds = this.availableCmds