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(EndPointsOverlay): Make setLocation optional #788

Conversation

binh-dam-ibigroup
Copy link
Collaborator

In response to opentripplanner/otp-react-redux#1272 (comment) , this PR makes the setLocation prop in the EndpointsOverlay optional (puts in the default noop handler as with other event handlers).

Copy link
Contributor

@daniel-heppner-ibigroup daniel-heppner-ibigroup left a comment

Choose a reason for hiding this comment

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

I feel less bad about requesting this change now that I see we already have noop as a default in here for other things

@binh-dam-ibigroup
Copy link
Collaborator Author

I feel less bad about requesting this change now that I see we already have noop as a default in here for other things

Maybe we'll have to remove the noops from here eventually?

@daniel-heppner-ibigroup
Copy link
Contributor

I feel less bad about requesting this change now that I see we already have noop as a default in here for other things

Maybe we'll have to remove the noops from here eventually?

Yeah It's a really wacky approach...

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.

I think a noop function is much cleaner than doing weird existence checks elsewhere! It's also computationally more efficient (fewer jumps)

@binh-dam-ibigroup binh-dam-ibigroup merged commit 4c6869a into opentripplanner:master Oct 11, 2024
2 checks passed
@binh-dam-ibigroup binh-dam-ibigroup deleted the endpoint-setlocation-optional branch October 11, 2024 15:18
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