Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add multi async instance support #214

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

youtuosoft
Copy link

No description provided.

@haohetao
Copy link

add multi async instance support
router add these code

const waitForStorageToBeReady = async (to, from, next) => {
  await Promise.all(store.restored)
  next()
}
router.beforeEach(waitForStorageToBeReady)

@nathanbrizzee
Copy link

I seem to be running into this problem too when using LocalForage and namespaced modules. The store.restored is being set before all my LocalForage namespaced modules finish loading. Consequently, routes are being displayed when they shouldn't.
Has anyone else experienced this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants