diff --git a/app/component/itinerary/TransitLeg.js b/app/component/itinerary/TransitLeg.js index 194642231b..866074c3db 100644 --- a/app/component/itinerary/TransitLeg.js +++ b/app/component/itinerary/TransitLeg.js @@ -66,7 +66,13 @@ class TransitLeg extends React.Component { constructor(props) { super(props); this.state = { - showIntermediateStops: props.leg.intermediatePlaces.length < 2, + showIntermediateStops: + props.interliningLegs.length >= 1 + ? props.interliningLegs.reduce( + (sum, leg) => sum + leg.intermediatePlaces.length, + 0, + ) < 2 + : props.leg.intermediatePlaces.length < 2, showAlternativeLegs: false, }; } @@ -143,7 +149,7 @@ class TransitLeg extends React.Component { renderIntermediate() { const { leg, mode, interliningLegs } = this.props; if ( - leg.intermediatePlaces.length > 0 && + (leg.intermediatePlaces.length > 0 || interliningLegs.length > 0) && this.state.showIntermediateStops === true ) { const places = leg.intermediatePlaces.slice(); @@ -419,7 +425,7 @@ class TransitLeg extends React.Component { color={leg.route ? `#${leg.route.color}` : 'currentColor'} renderBottomMarker={ !this.state.showIntermediateStops || - leg.intermediatePlaces.length === 0 + (leg.intermediatePlaces.length === 0 && interliningLegs.length < 1) } />
{intermediateStopCount !== 0 && (