Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions lib/actions/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,16 @@ export function setViewedRoute(payload) {

dispatch(viewRoute(payload))

const path = getPathFromParts(
'route',
payload?.routeId,
// If a pattern is supplied, include pattern in path
payload?.patternId && 'pattern',
payload?.patternId
)
dispatch(routeTo(path))
if (payload?.routeId) {
const path = getPathFromParts(
'route',
payload?.routeId,
// If a pattern is supplied, include pattern in path
payload?.patternId && 'pattern',
payload?.patternId
)
dispatch(routeTo(path))
}
}
}

Expand Down Expand Up @@ -289,6 +291,7 @@ export function matchContentToUrl(map, location) {

dispatch(setMainPanelContent(MainPanelContent.NEARBY_VIEW))
}
dispatch(setViewedRoute(null))
break
case 'trip':
dispatch(setViewedStop(null))
Expand Down
Loading