Skip to content

Commit

Permalink
Use conditional chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
amy-corson-ibigroup committed May 21, 2024
1 parent 3a63644 commit 0c42fb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/components/viewers/route-details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class RouteDetails extends Component<Props> {
const { agency, patterns = {}, shortName, url } = route
const pattern = patterns[patternId]

const moreDetailsURL = url || route.agency.url
const moreDetailsURL = url || route?.agency?.url

const routeColor = getRouteColorBasedOnSettings(operator, route)

Expand Down

0 comments on commit 0c42fb9

Please sign in to comment.