Skip to content

Bugfix: Prevent slow getRoute calls from overriding faster ones #528

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

Merged

Conversation

ammapspeople
Copy link
Collaborator

@ammapspeople ammapspeople commented Jun 6, 2025

What

Prevent slower getRoute calls from overtaking faster ones.

Why

In the case of eg. My Position being used, and the position is far away from the current venue, external directions responses can be extremely slow. This had the result of overriding a faster route call then the slow response finally resolved, leading to a sudden jump to an unexpected route.

How

  • Introduced an isActive flag to prevent older ones from overtaking. The cleanup function where isActive is set to false is always run before the effect runs again.

@ammapspeople ammapspeople marked this pull request as draft June 6, 2025 08:52
Base automatically changed from refactor/bottom-sheet to main June 11, 2025 09:57
@ammapspeople ammapspeople marked this pull request as ready for review June 11, 2025 11:58
Copy link
Contributor

@matbmapspeople matbmapspeople left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me ✅

@ammapspeople ammapspeople merged commit 886f240 into main Jun 12, 2025
1 check passed
@ammapspeople ammapspeople deleted the bugfix/prevent-browser-position-from-taking-over-routing branch June 12, 2025 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants