Skip to content

Commit

Permalink
fix(transit-leg): disruption view not showing on alert click
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Helms authored and hbruch committed Feb 7, 2025
1 parent 3ffac7b commit eba80eb
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions app/component/TransitLeg.js
Original file line number Diff line number Diff line change
Expand Up @@ -527,14 +527,12 @@ class TransitLeg extends React.Component {
<div className="disruption-link-container">
<Link
to={
(alert.route &&
alert.route.gtfsId &&
leg.route &&
leg.trip &&
`/${PREFIX_ROUTES}/${leg.route.gtfsId}/${PREFIX_DISRUPTION}/${leg.trip.pattern.code}`) ||
(alert.stop && alert.stop.gtfsId
// eslint-disable-next-line no-nested-ternary
leg?.route?.gtfsId && leg?.trip?.pattern?.code
? `/${PREFIX_ROUTES}/${leg.route.gtfsId}/${PREFIX_DISRUPTION}/${leg.trip.pattern.code}`
: alert?.stop?.gtfsId
? `/${PREFIX_STOPS}/${alert.stop.gtfsId}/${PREFIX_DISRUPTION}/`
: '')
: ''
}
className="disruption-link"
>
Expand Down

0 comments on commit eba80eb

Please sign in to comment.