diff --git a/lib/components/viewers/route-details.tsx b/lib/components/viewers/route-details.tsx index 0c20ea83a..aaacb4a42 100644 --- a/lib/components/viewers/route-details.tsx +++ b/lib/components/viewers/route-details.tsx @@ -82,6 +82,8 @@ class RouteDetails extends Component { const { agency, patterns = {}, shortName, url } = route const pattern = patterns[patternId] + const moreDetailsURL = url || route?.agency?.url + const routeColor = getRouteColorBasedOnSettings(operator, route) const headsigns = Object.entries(patterns) @@ -180,7 +182,7 @@ class RouteDetails extends Component { /> )} - {url && ( + {moreDetailsURL && ( @@ -188,7 +190,7 @@ class RouteDetails extends Component { style={{ color: getMostReadableTextColor(routeColor, route?.textColor) }} - url={url} + url={moreDetailsURL} /> )}