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

this isn't bound to the Vue instance inside beforeRouteUpdate hook #1320

Closed
decademoon opened this issue Apr 10, 2017 · 0 comments
Closed

this isn't bound to the Vue instance inside beforeRouteUpdate hook #1320

decademoon opened this issue Apr 10, 2017 · 0 comments

Comments

@decademoon
Copy link
Contributor

Version

2.4.0

Reproduction link

http://jsfiddle.net/df4Lnuw6/143/

Steps to reproduce

  • Create a route with a child.
  • Navigate to the child route with a query parameter. The browser must be at this route initially.
  • In the created hook for the root component, replace the route without the query parameter.
  • The beforeRouteUpdate hook gets called for the child component with this either undefined or equal to the window object.

What is expected?

this should be equal to the Vue instance.

What is actually happening?

this is undefined (as is the case for my webpack build) or equal to the window object (in the fiddle).

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

No branches or pull requests

1 participant