Skip to content

Commit

Permalink
fix: Add default array for parsing waypoints (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmccollum-woolpert authored Jan 23, 2025
1 parent 6d0e69f commit 3902328
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,10 @@ export class UploadDialogComponent {
private get scenarioWaypoints(): IWaypoint[] {
return [
this.scenario?.model?.shipments?.flatMap((shipment) =>
shipment.pickups
?.flatMap((pickup) => [pickup.arrivalWaypoint, pickup.departureWaypoint])
(shipment.pickups || [])
.flatMap((pickup) => [pickup.arrivalWaypoint, pickup.departureWaypoint])
.concat(
shipment.deliveries?.flatMap((delivery) => [
(shipment.deliveries || []).flatMap((delivery) => [
delivery.arrivalWaypoint,
delivery.departureWaypoint,
])
Expand Down

0 comments on commit 3902328

Please sign in to comment.