Skip to content

Pushing params without path broken in 3.4.2 #3289

Closed
@Flowm

Description

@Flowm

Version

3.4.2

Reproduction link

https://codepen.io/flowm/pen/xxVGYZq?editors=1011

Steps to reproduce

After updating vue-router from 3.4.1 to 3.4.2 a router.push() with only query params causes navigation to an empty path.

Clicking the "Push query" in the codepen triggers such a call which results in the root component to stop being rendered.

What is expected?

The path query params should be updated.

What is actually happening?

The path query params are updated, but the router also navigates to an empty path causing router-view to be empty after the call.


Issue seems to be caused by the different code path taken for query param updates after 4fbaa9f. Reverting this commit restores the old behaviour that allows router.push() with only query params.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions