Skip to content

Commit b5a7fc5

Browse files
author
Adrian Rosales
committed
fix(transitive-overlay): prevent false positive of leg.route being object causing crash
1 parent 331cd80 commit b5a7fc5

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)