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

noe132 opened this Issue Apr 12, 2019 · 1 comment


2 participants
Copy link

noe132 commented Apr 12, 2019



Reproduction link

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 posva added the bug label Apr 13, 2019

@posva posva self-assigned this Apr 13, 2019

posva added a commit that referenced this issue Apr 13, 2019

@posva posva closed this in #2713 Apr 13, 2019

posva added a commit that referenced this issue Apr 13, 2019

@posva posva added this to Done in Longterm Apr 15, 2019


This comment has been minimized.

Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.