File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ interface ToolSelectorNarrowProps {
10
10
route : PlatformRoute
11
11
}
12
12
13
+ const isParamRoute : ( route : string ) => boolean = ( route : string ) => ! ! route . match ( / ^ : [ ^ / ] + $ / )
14
+
13
15
const ToolSelectorNarrow : FC < ToolSelectorNarrowProps > = ( props : ToolSelectorNarrowProps ) => {
14
16
15
17
const route : PlatformRoute = props . route
@@ -18,7 +20,7 @@ const ToolSelectorNarrow: FC<ToolSelectorNarrowProps> = (props: ToolSelectorNarr
18
20
const baseClass : string = 'tool-selector-narrow'
19
21
const isActive : boolean = routeIsActive ( useLocation ( ) . pathname , path )
20
22
const activeIndicaterClass : string = `${ baseClass } -${ isActive ? '' : 'in' } active`
21
- const hasChildren : boolean = ! ! route . children . some ( child => ! ! child . route )
23
+ const hasChildren : boolean = ! ! route . children . some ( child => ! ! child . route && ! isParamRoute ( child . route ) )
22
24
23
25
return (
24
26
< div className = { styles [ baseClass ] } >
You can’t perform that action at this time.
0 commit comments