Skip to content

Commit

Permalink
Add default array for parsing waypoints
Browse files Browse the repository at this point in the history
  • Loading branch information
jmccollum-woolpert committed Jan 23, 2025
1 parent 6d0e69f commit 16618f6
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 16618f6

Please sign in to comment.