Add await to login action'
This commit is contained in:
parent
987b5162a7
commit
2d05aef24b
@ -241,7 +241,7 @@ const afterStoreSetup = async ({ store, i18n }) => {
|
|||||||
|
|
||||||
// Now we have the server settings and can try logging in
|
// Now we have the server settings and can try logging in
|
||||||
if (store.state.oauth.token) {
|
if (store.state.oauth.token) {
|
||||||
store.dispatch('loginUser', store.state.oauth.token)
|
await store.dispatch('loginUser', store.state.oauth.token)
|
||||||
}
|
}
|
||||||
|
|
||||||
const router = new VueRouter({
|
const router = new VueRouter({
|
||||||
|
@ -60,9 +60,6 @@ export default function createPersistedState ({
|
|||||||
merge({}, store.state, savedState)
|
merge({}, store.state, savedState)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (store.state.oauth.token) {
|
|
||||||
store.dispatch('loginUser', store.state.oauth.token)
|
|
||||||
}
|
|
||||||
loaded = true
|
loaded = true
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log("Couldn't load state")
|
console.log("Couldn't load state")
|
||||||
|
Loading…
Reference in New Issue
Block a user