Skip to content

Commit

Permalink
account for undefined route viewer config
Browse files Browse the repository at this point in the history
  • Loading branch information
amy-corson-ibigroup committed Jan 8, 2025
1 parent f8fc89c commit e3401b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/components/viewers/route-details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@ class RouteDetails extends Component<Props> {
}

const mapStateToProps = (state: any) => {
const { sortRoutePatternsByVehicleCount } = state.otp.config.routeViewer
const sortRoutePatternsByVehicleCount =
state.otp?.config?.routeViewer?.sortRoutePatternsByVehicleCount

return {
sortPatternsByVehicleCount: sortRoutePatternsByVehicleCount !== false
Expand Down

0 comments on commit e3401b6

Please sign in to comment.