Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

abstract mode's router.back() fails if there are 2 consecutive same routes in history stack #2607

Comments

@rocka
Copy link

rocka commented Feb 8, 2019

Version

3.0.2

Reproduction link

https://jsfiddle.net/Rocka/bhu5vkn8/3/

Steps to reproduce

  1. Click 10. artist
  2. Hit button togglePlayer
  3. Click 10. artist
  4. Hit button back 2 times

What is expected?

route back to /search

What is actually happening?

nothing happend, route and route-view do not change


'cause I didn't figure out how to determine wether the route is going forward or backword, I decided to use abstract mode and traverse the router stack to find out which direction the route is going, then hit into this bug. The demo works fine if change router's mode to hash or history.

@posva posva changed the title abstract mode's router.back() was aborted when there are 2 same routes in history stack abstract mode's router.back() fails if there are 2 consecutive same routes in history stack Mar 26, 2019
@posva posva added the bug label Mar 26, 2019
@posva posva added this to Doable or in refactor (low prio, low complex) in Longterm Mar 26, 2019
@tarunmangukiya
Copy link

Facing same issue!

Domino9697 added a commit to Domino9697/vue-router that referenced this issue May 17, 2019
Fix abstract mode's router.back() when 2 consecutive same routes appear in the history stack array

fix vuejs#2607
@posva posva added the has PR label May 17, 2019
posva pushed a commit to Domino9697/vue-router that referenced this issue Jul 5, 2019
Fix abstract mode's router.back() when 2 consecutive same routes appear in the history stack array

fix vuejs#2607
@posva posva closed this as completed in 8910979 Jul 5, 2019
@posva posva moved this from Doable or in refactor (low prio, low complex) to Done in Longterm Jul 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment