Skip to content

beforeRouteEnter hook's next callback invoked with wrong instance #1874

Closed
@nirazul

Description

@nirazul

Version

3.0.1

Reproduction link

https://codepen.io/Nirazul/pen/GOrjVW?editors=1010

Steps to reproduce

Follow these instructions to reproduce the issue:

  1. Click on "Baz"
  2. Click on "Bar"
  3. Click on "Foo"
  4. Click on "Baz" again

You should see that "$data" is empty.

It doesn't matter where you start as long as you follow the above order at some point. The behaviour is normal, when you leave out the second or third step.

What is expected?

The route succeeds in fetching the correct data in any order of navigation.

What is actually happening?

When I follow the pages in the order described in the reproduction steps section, the router fails to load one of the pages.


It most definitely has something to do with the transition mode "out-in". When I remove the attribute or use "in-out", everything seems to work normally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions