File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -95,14 +95,16 @@ export function setViewedRoute(payload) {
9595
9696 dispatch ( viewRoute ( payload ) )
9797
98- const path = getPathFromParts (
99- 'route' ,
100- payload ?. routeId ,
101- // If a pattern is supplied, include pattern in path
102- payload ?. patternId && 'pattern' ,
103- payload ?. patternId
104- )
105- dispatch ( routeTo ( path ) )
98+ if ( payload ?. routeId ) {
99+ const path = getPathFromParts (
100+ 'route' ,
101+ payload ?. routeId ,
102+ // If a pattern is supplied, include pattern in path
103+ payload ?. patternId && 'pattern' ,
104+ payload ?. patternId
105+ )
106+ dispatch ( routeTo ( path ) )
107+ }
106108 }
107109}
108110
@@ -289,6 +291,7 @@ export function matchContentToUrl(map, location) {
289291
290292 dispatch ( setMainPanelContent ( MainPanelContent . NEARBY_VIEW ) )
291293 }
294+ dispatch ( setViewedRoute ( null ) )
292295 break
293296 case 'trip' :
294297 dispatch ( setViewedStop ( null ) )
You can’t perform that action at this time.
0 commit comments