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

Only call stopTimes if we don't already have the data #1308

Merged
merged 5 commits into from
Dec 3, 2024

Conversation

amy-corson-ibigroup
Copy link
Contributor

Description:
Fixes a bug where interaction with setViewedRoute was causing the findStopTimesForStop and subsequent response to fire forever. This should only fire when the stop information isn't already there. Also adds a forceFetch param for the stop schedule viewer, so that if you're trying to look at different schedule days, it will update the info with the new day.

PR Checklist:

  • Does the code follow accessibility standards (WCAG 2.1 AA Compliant)?
  • Are all languages supported (Internationalization/Localization)?
  • Are appropriate Typescript types implemented?

Copy link
Collaborator

@miles-grant-ibigroup miles-grant-ibigroup left a comment

Choose a reason for hiding this comment

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

Wonderful work!

Comment on lines 509 to 514
if (
!params.forceFetch &&
getState().otp.transitIndex.stops[params.stopId]
) {
return
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we one-line this if eslint lets us? Getting rid of the brackets might help.

Copy link
Contributor

@josh-willis-arcadis josh-willis-arcadis left a comment

Choose a reason for hiding this comment

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

LGTM!

@amy-corson-ibigroup amy-corson-ibigroup merged commit f7ed865 into dev Dec 3, 2024
9 checks passed
@amy-corson-ibigroup amy-corson-ibigroup deleted the fix-operator-icon-viewroutes-bug branch December 3, 2024 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants