-
Notifications
You must be signed in to change notification settings - Fork 845
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
Fix the redundant navigation error #2286
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?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleanup duplicate statements (especially conditional)
isQueryEmpty
can also be removed
Co-authored-by: PikachuEXE <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.