vuejs / router

🚦 The official router for Vue.js
https://router.vuejs.org/
MIT License
3.75k stars 1.15k forks source link

router.push with alias not changing original URL #2194

Closed alghifarifikri closed 3 months ago

alghifarifikri commented 3 months ago

Reproduction

https://jsfiddle.net/h3gdzkaf/3/

Steps to reproduce the bug

Add the following to your router:

{ path: '/bar', alias: '/bar/alias', component: Bar }

Expected behavior

when I'm access '/bar/alias' from '/bar', URL should be change

Actual behavior

original URL not change, always '/bar'

Additional information

No response

posva commented 3 months ago

This is expected, it's considered a duplicated navigation and it's skipped.