Skip to content

Commit

Permalink
Merge pull request #812 from opentripplanner/PRJ77-370
Browse files Browse the repository at this point in the history
fix(transitive-overlay): Prevent null route object from causing crash
  • Loading branch information
miles-grant-ibigroup authored Feb 27, 2025
2 parents 4b34b09 + b5a7fc5 commit 1d7698b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/transitive-overlay/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ export function itineraryToTransitive(
route_short_name: routeLabel
};

if (typeof leg.route === "object") {
if (typeof leg.route === "object" && leg.route !== null) {
routes[routeId] = {
...basicRouteAttributes,
route_long_name: leg.route.longName || "",
Expand Down

0 comments on commit 1d7698b

Please sign in to comment.