Skip to content

Commit

Permalink
tripPattern could be undefined when collapsing itinerary
Browse files Browse the repository at this point in the history
  • Loading branch information
testower committed Oct 30, 2023
1 parent 997f932 commit bfb8c1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client-next/src/components/MapView/LegLines.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { Layer, Source } from 'react-map-gl';
import { decode } from '@googlemaps/polyline-codec';
import { getColorForMode } from '../../util/getColorForMode.ts';

export function LegLines({ tripPattern }: { tripPattern: TripPattern }) {
export function LegLines({ tripPattern }: { tripPattern?: TripPattern }) {
return (
<>
{tripPattern.legs.map(
{tripPattern?.legs.map(
(leg, i) =>
leg.pointsOnLink && (
<Source
Expand Down

0 comments on commit bfb8c1f

Please sign in to comment.