Skip to content

Commit 1d7698b

Browse files
Merge pull request #812 from opentripplanner/PRJ77-370
fix(transitive-overlay): Prevent null route object from causing crash
2 parents 4b34b09 + b5a7fc5 commit 1d7698b

File tree

1 file changed

+1
-1
lines changed
  • packages/transitive-overlay/src

1 file changed

+1
-1
lines changed

packages/transitive-overlay/src/util.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ export function itineraryToTransitive(
408408
route_short_name: routeLabel
409409
};
410410

411-
if (typeof leg.route === "object") {
411+
if (typeof leg.route === "object" && leg.route !== null) {
412412
routes[routeId] = {
413413
...basicRouteAttributes,
414414
route_long_name: leg.route.longName || "",

0 commit comments

Comments
 (0)