Skip to content

Commit f8a0ef0

Browse files
improvement(connected-trip-overlays): show trip in stop viewer if no route shown
1 parent 4d31217 commit f8a0ef0

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Diff for: lib/components/map/connected-endpoints-overlay.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ import { getActiveSearch, getShowUserSettings } from '../../util/state'
1212
// connect to the redux store
1313

1414
const mapStateToProps = (state, ownProps) => {
15+
const { viewedRoute } = state.otp.ui
1516
// If trip viewer is not active, do not show trip on map
16-
if (state.otp.ui.mainPanelContent !== null) {
17+
if (state.otp.ui.mainPanelContent !== null && viewedRoute) {
1718
return {}
1819
}
1920

Diff for: lib/components/map/connected-transitive-overlay.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ import { getTransitiveData } from '../../util/state'
77

88
const mapStateToProps = (state, ownProps) => {
99
const { labeledModes, styles } = state.otp.config.map.transitive || {}
10+
const { viewedRoute } = state.otp.ui
1011

1112
// If trip viewer is not active, do not show trip on map
12-
if (state.otp.ui.mainPanelContent !== null) {
13-
return {tripData: null}
13+
if (state.otp.ui.mainPanelContent !== null && viewedRoute) {
14+
return {}
1415
}
1516

1617
return {

0 commit comments

Comments
 (0)