Skip to content

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

Closed
@decademoon

Description

@decademoon

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions