Skip to content

next(false) in beforeEach pushes state when using the browser forward button #2814

Open
@eyalhakim

Description

@eyalhakim

Version

3.0.1

Reproduction link

https://codesandbox.io/s/vue-routing-example-mjmxd

Steps to reproduce

Click on "goodbye"
Click back in browser
Click forward in browser

last url is pushed into history

What is expected?

In ensureUrl, we need to pass false instead of true to make sure current (out-of-sync) url is replaced and not pushed to history

What is actually happening?

The next function passes true to the ensureUrl function thus making it push the out-of-sync url to history

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfixed on 4.xThis issue has been already fixed on the v4 but exists in v3

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions