Fix the redundant navigation error#2286
Conversation
|
@ChunkyProgrammer Thanks for noticing that, should be fixed now. |
|
Was able to have this error happen again when searching (search the same thing twice) |
|
Potentially we need to hijack the prototype of the vue-router push function here? I mean is it feasible to expect every single next router interaction to always remember to put this if statement in place? |
|
I thought about that but I haven't looked into the source code for that yet (if you want to take a look remember to look at the source code for the version that FreeTube uses). Although I'll need to expand the checks to also check the query parameters etc. |
|
I've now removed the individual checks and wrapped the router push function in one that checks the path and query before navigating. |
|
Can we have a summary of what to be tested?
|
PikachuEXE
left a comment
There was a problem hiding this comment.
Tested
- spamming the nav buttons
- clicking the profile select's setting icon
- search the same thing twice
- Paste a YT Video URL to navbar, press arrow button multiple times
PikachuEXE
left a comment
There was a problem hiding this comment.
Cleanup duplicate statements (especially conditional)
isQueryEmpty can also be removed
Co-authored-by: PikachuEXE <pikachuexe@gmail.com>
efb4f5ff-1298-471a-8973-3d47447115dc
left a comment
There was a problem hiding this comment.
LGTM
|
@ChunkyProgrammer sorry for the spam :D |
|
@efb4f5ff-1298-471a-8973-3d47447115dc |

Fix the redundant navigation error
Pull Request Type
Description
Fixes the issue where spamming the nav buttons throws vue errors about redundant navigations.
Screenshots (if appropriate)

Testing (for code that is not small enough to be easily understandable)
I spammed the nav buttons and the error didn't occur anymore.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.