fix: don't try to load lists after logging out
Resolves https://kolaente.dev/vikunja/frontend/issues/329
This commit is contained in:
parent
0fe2a16a7c
commit
4c560f1a03
1 changed files with 5 additions and 1 deletions
|
@ -76,12 +76,16 @@ const welcome = useDateTimeSalutation()
|
||||||
|
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
const listHistory = computed(() => {
|
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()
|
return getHistory()
|
||||||
.map(l => store.getters['lists/getListById'](l.id))
|
.map(l => store.getters['lists/getListById'](l.id))
|
||||||
.filter(l => l !== null)
|
.filter(l => l !== null)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
const migratorsEnabled = computed(() => store.state.config.availableMigrators?.length > 0)
|
const migratorsEnabled = computed(() => store.state.config.availableMigrators?.length > 0)
|
||||||
const userInfo = computed(() => store.state.auth.info)
|
const userInfo = computed(() => store.state.auth.info)
|
||||||
const hasTasks = computed(() => store.state.hasTasks)
|
const hasTasks = computed(() => store.state.hasTasks)
|
||||||
|
|
Loading…
Reference in a new issue