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

push to route with async component before create root vue instance will fail #2712

Closed
Labels

Comments

@noe132
Copy link

noe132 commented Apr 12, 2019

Version

3.0.3

Reproduction link

https://jsfiddle.net/qLz5ew9t/

Steps to reproduce

  1. create a vue-router instance
  2. call router.push to some async-component-route
  3. create the root vue instance

What is expected?

router.push success

What is actually happening?

router.push was aborted


If we change step2 to push to some sync-component-route, then the push would be success.
Or, exchange step2 with step3, call router.push after create the vue instance, router.push will also success
Is this intended or a bug or not allowed use cases?

@posva
Copy link
Member

posva commented Apr 17, 2019

I'm reverting this because the fix introduces some regressions.
The asyncPush should be wrapped in a router.onReady. I feel that this often bites people so I'm labelling this as a doc issue

@posva posva reopened this Apr 17, 2019
@posva posva added docs and removed bug labels Apr 17, 2019
@posva posva removed their assignment Aug 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment