Skip to content

ui-charts: fix useManchetteWithSpaceTimeChart() errors with zero waypoints #11571

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
merged 2 commits into from
Apr 29, 2025

Conversation

emersion
Copy link
Member

In multiple spots the hook assumed there is at least one waypoint in list. Add guards to avoid crashing with errors when that's the case.

Reported by @Castavo

@emersion emersion requested review from clarani and Akctarus April 24, 2025 13:22
@emersion emersion requested a review from a team as a code owner April 24, 2025 13:22
@github-actions github-actions bot added the area:front Work on Standard OSRD Interface modules label Apr 24, 2025
@emersion emersion self-assigned this Apr 24, 2025
@Synar
Copy link
Contributor

Synar commented Apr 24, 2025

Worth checking if it solves #10496

@emersion emersion force-pushed the emr/use-manchette-with-space-time-chart-empty-waypoints branch from 8d86ec6 to ec169a0 Compare April 28, 2025 15:03
@emersion emersion requested a review from Synar April 28, 2025 15:03
@emersion emersion force-pushed the emr/use-manchette-with-space-time-chart-empty-waypoints branch from ec169a0 to d158316 Compare April 29, 2025 09:44
Copy link
Contributor

@clarani clarani left a comment

Choose a reason for hiding this comment

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

LGTM and tested ✅

…oints

In multiple spots the hook assumed there is at least one waypoint in
list. Add guards to avoid crashing with errors when that's the case.

Signed-off-by: Simon Ser <[email protected]>
@emersion emersion force-pushed the emr/use-manchette-with-space-time-chart-empty-waypoints branch from d158316 to 0c6f0f8 Compare April 29, 2025 12:49
@emersion
Copy link
Member Author

@clarani found an ESLint warning, fixed with the last push. CI is fixed to catch these warnings in #11619.

@emersion emersion added this pull request to the merge queue Apr 29, 2025
Merged via the queue into dev with commit 16d7894 Apr 29, 2025
27 checks passed
@emersion emersion deleted the emr/use-manchette-with-space-time-chart-empty-waypoints branch April 29, 2025 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:front Work on Standard OSRD Interface modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants