Skip to content

Commit 0cc2a2b

Browse files
authored
[Docs Site] Fix isCurrent sidebar item on custom pages and nested hideChildren pages (#19217)
1 parent 32a7c86 commit 0cc2a2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/overrides/Sidebar.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ async function handleGroup(group: Group): Promise<SidebarEntry> {
9595
label: group.label,
9696
order: group.order,
9797
attrs: {},
98-
isCurrent: indexLink.href.slice(1, -1) === Astro.params.slug,
98+
isCurrent: Astro.url.pathname.startsWith(indexLink.href),
9999
} as Link;
100100
}
101101

0 commit comments

Comments
 (0)