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

Fix Duplicate Hunt on Navigation to Hunt Page #682

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

coreyogburn
Copy link
Contributor

In the Vue transition, I added a call to loadData at the end of initHunt because loading the page was not executing the default query and this change seemed to fix it. I didn't know it at the time, but it resulted in the first query when navigating to the hunt page being executed twice.

The actual root of the problem is that navigating to your exact, current route does not navigate. This results in $route not changing, which means the watch for it doesn't call loadData. This was discovered during the Vue transition but the fix was only applied to pushing a new state (hunt.js:367) and was not applied to when we replace the state. The same fix that was applied then has been applied more thoroughly and now there's only 1 hunt executed during page load.

In the Vue transition, I added a call to loadData at the end of initHunt because loading the page was not executing the default query and this change seemed to fix it. I didn't know it at the time, but it resulted in the first query when navigating to the hunt page being executed twice.

The actual root of the problem is that navigating to your exact, current route does not navigate. This results in $route not changing, which means the watch for it doesn't call loadData. This was discovered during the Vue transition but the fix was only applied to pushing a new state (hunt.js:367) and was not applied to when we replace the state. The same fix that was applied then has been applied more thoroughly and now there's only 1 hunt executed during page load.
@coreyogburn coreyogburn merged commit 67071e0 into 2.4/dev Nov 22, 2024
3 checks passed
@coreyogburn coreyogburn deleted the cogburn/fix-duplicate-hunt branch November 22, 2024 20:04
@github-actions github-actions bot locked and limited conversation to collaborators Nov 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants