Merge branch 'fix/add-await-to-login-request' into 'develop'

!701 Add await to login action in after_store

See merge request pleroma/pleroma-fe!709
This commit is contained in:
Shpuld Shpludson 2019-03-27 16:22:31 +00:00
commit 85e9e52090
2 changed files with 1 additions and 4 deletions

View File

@ -241,7 +241,7 @@ const afterStoreSetup = async ({ store, i18n }) => {
// Now we have the server settings and can try logging in
if (store.state.oauth.token) {
store.dispatch('loginUser', store.state.oauth.token)
await store.dispatch('loginUser', store.state.oauth.token)
}
const router = new VueRouter({

View File

@ -60,9 +60,6 @@ export default function createPersistedState ({
merge({}, store.state, savedState)
)
}
if (store.state.oauth.token) {
store.dispatch('loginUser', store.state.oauth.token)
}
loaded = true
} catch (e) {
console.log("Couldn't load state")