Skip to content

Commit d565050

Browse files
authored
Account for overlapping paths (#20957)
1 parent 4a51cee commit d565050

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/sidebar/SidebarProduct.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ export const SidebarProduct = () => {
5454
const isStandaloneCategory = childPage.page.documentType === 'article'
5555

5656
const childTitle = childPage.renderedShortTitle || childPage.renderedFullTitle
57-
58-
const isActive = routePath.includes(childPage.href) || routePath === childPage.href
57+
const isActive =
58+
routePath.includes(childPage.href + '/') || routePath === childPage.href
5959
const defaultOpen = hasExactCategory ? isActive : false
6060
return (
6161
<li

0 commit comments

Comments
 (0)