fix: don't try to load lists after logging out

Resolves vikunja/frontend#329
This commit is contained in:
kolaente 2022-07-21 15:53:08 +02:00
parent 0fe2a16a7c
commit 4c560f1a03
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 5 additions and 1 deletions

View File

@ -76,12 +76,16 @@ const welcome = useDateTimeSalutation()
const store = useStore()
const listHistory = computed(() => {
// If we don't check this, it tries to load the list background right after logging out
if(!store.state.auth.authenticated) {
return []
}
return getHistory()
.map(l => store.getters['lists/getListById'](l.id))
.filter(l => l !== null)
})
const migratorsEnabled = computed(() => store.state.config.availableMigrators?.length > 0)
const userInfo = computed(() => store.state.auth.info)
const hasTasks = computed(() => store.state.hasTasks)