Skip to content

Commit 769104d

Browse files
fix(connected-stop-marker): avoid crash when not viewing stop
1 parent abcff83 commit 769104d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/components/map/connected-stop-marker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const mapStateToProps = (state, ownProps) => {
1111
const routeData = viewedRoute && state.otp.transitIndex.routes?.[viewedRoute.routeId]
1212
const hoverColor = routeData?.routeColor || '#333'
1313
let fillColor = highlightedStop === ownProps.entity.id ? hoverColor : '#FFF'
14-
if (viewedStop.stopId === ownProps.entity.id) {
14+
if (viewedStop?.stopId === ownProps.entity.id) {
1515
fillColor = 'cyan'
1616
}
1717

0 commit comments

Comments
 (0)