Skip to content

Commit

Permalink
AB#48147: Improve missing line data error handling (#431)
Browse files Browse the repository at this point in the history
  • Loading branch information
e-halinen authored Dec 9, 2024
1 parent f80ea9f commit ed19393
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/util/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ function routesToTree(routes, { stopZone, shortId }, height = 'auto', width = MA
type: 'stop',
zone: stop.stopZone,
routeSegments: stop.routeSegments.nodes.map(segment => {
const trunkRoute = segment.line.nodes[0].trunkRoute === '1';
let trunkRoute;
try {
trunkRoute = segment.line.nodes[0].trunkRoute === '1';
} catch (e) {
trunkRoute = false;
}
return {
...segment,
trunkRoute,
Expand Down

0 comments on commit ed19393

Please sign in to comment.