fix: make sure the app is fully ready before trying to redirect to the login page

This commit is contained in:
kolaente 2022-01-08 15:44:33 +01:00
parent 68a76faacc
commit 55826bb8c9
Signed by untrusted user who does not match committer: konrad
GPG key ID: F40E70337AB24C9B
3 changed files with 14 additions and 8 deletions

View file

@ -136,10 +136,9 @@ export const store = createStore({
commit(CURRENT_LIST, currentList)
},
async loadApp({commit, dispatch}) {
async loadApp({dispatch}) {
await checkAndSetApiUrl(window.API_URL)
await dispatch('auth/checkAuth')
commit('vikunjaReady', true)
},
},
})