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

onReady triggers the onError callback with a redirection #3225

Closed
posva opened this issue Jun 11, 2020 · 0 comments
Closed

onReady triggers the onError callback with a redirection #3225

posva opened this issue Jun 11, 2020 · 0 comments

Comments

@posva
Copy link
Member

posva commented Jun 11, 2020

This is a regression introduced in 3.3.0:

Given this code:

router.beforeEach((to, from, next) => {
  if (to.path === '/') next('/foo')
  else next()
})

router.onReady(() => {
console.log('good')
}, err => {
  console.log(err)
})

The initial navigation would trigger the second callback passed to onReady instead of the first one. This is because the Redirection Error is now visible instead of undefined

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

No branches or pull requests

1 participant