diff --git a/lib/components/map/connected-route-viewer-overlay.js b/lib/components/map/connected-route-viewer-overlay.js
index <HASH>..<HASH> 100644
--- a/lib/components/map/connected-route-viewer-overlay.js
+++ b/lib/components/map/connected-route-viewer-overlay.js
@@ -21,7 +21,7 @@ const mapStateToProps = (state, ownProps) => {
 
   return {
     clipToPatternStops:
-      state.otp.config.routeViewer.hideRouteShapesWithinFlexZones,
+      state.otp.config?.routeViewer?.hideRouteShapesWithinFlexZones,
     routeData: { ...routeData, patterns: filteredPatterns }
   }
 }
refactor(connected-route-viewer-overlay): avoid crash when routeViewer missing from config