From 24f0ddfb58a3e27e0a34c4a1908c0295af6b9fdf Mon Sep 17 00:00:00 2001 From: Amy Corson <115499534+amy-corson-ibigroup@users.noreply.github.com> Date: Fri, 5 Sep 2025 13:48:48 -0500 Subject: [PATCH 1/2] Include route.shortname in the transitive route label --- lib/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/app.js b/lib/app.js index b823d8240..3cc4e72c8 100644 --- a/lib/app.js +++ b/lib/app.js @@ -167,7 +167,7 @@ const components = { * @returns A string with the custom label to display for the given leg, or null to render no label. */ getTransitiveRouteLabel: (itineraryLeg) => { - return itineraryLeg.routeShortName // null or undefined or empty string will tell transitive-js to not render a route label. + return itineraryLeg.routeShortName || itineraryLeg.route.shortName // null or undefined or empty string will tell transitive-js to not render a route label. }, ItineraryBody: DefaultItinerary, From 5dd1744ecd13fcad088e36da3cd5567e55e1271c Mon Sep 17 00:00:00 2001 From: Amy Corson <115499534+amy-corson-ibigroup@users.noreply.github.com> Date: Mon, 8 Sep 2025 10:26:18 -0500 Subject: [PATCH 2/2] Add conditional for route --- lib/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/app.js b/lib/app.js index 3cc4e72c8..718934024 100644 --- a/lib/app.js +++ b/lib/app.js @@ -167,7 +167,7 @@ const components = { * @returns A string with the custom label to display for the given leg, or null to render no label. */ getTransitiveRouteLabel: (itineraryLeg) => { - return itineraryLeg.routeShortName || itineraryLeg.route.shortName // null or undefined or empty string will tell transitive-js to not render a route label. + return itineraryLeg.routeShortName || itineraryLeg.route?.shortName // null or undefined or empty string will tell transitive-js to not render a route label. }, ItineraryBody: DefaultItinerary,