Skip to content

beforeRouteUpdate never calls next callback #1582

Open
@bdoms

Description

@bdoms

Version

2.7.0

Reproduction link

http://jsfiddle.net/znmLks2w/2/

Steps to reproduce

Create a component with a beforeRouteUpdate guard that passes a callback to the next function.

What is expected?

The callback function should be called.

What is actually happening?

The callback is never called.


In my example I have both beforeRouteEnter and beforeRouteUpdate pointing to the exact same function. beforeRouteEnter works exactly like I expect, but beforeRouteUpdate does not. Click on the links to try to add one to the displayed value and you'll notice it works the first time but never any of the subsequent times.

If this behavior is purposeful then I would consider it a documentation bug - the docs need to be absolutely clear that next behaves differently depending on where you're calling it from. But even as I type this I'm realizing that if that's the case then it's terrible design. It should work the same way regardless.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions