Skip to content

Commit

Permalink
fix: use fix for async storage
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroAkbal committed Apr 11, 2021
1 parent e5f960d commit e10da7d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions plugins/vuex-persist.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,12 @@ export default (context) => {
}
},
}).plugin(store)

// Fix for async storage
const waitForStorageToBeReady = async (to, from, next) => {
await store.restored
next()
}

router.beforeEach(waitForStorageToBeReady)
}

0 comments on commit e10da7d

Please sign in to comment.