summaryrefslogtreecommitdiff
path: root/examples/docs/src/components/LeftSidebar/LeftSidebar.astro
diff options
context:
space:
mode:
Diffstat (limited to 'examples/docs/src/components/LeftSidebar/LeftSidebar.astro')
-rw-r--r--examples/docs/src/components/LeftSidebar/LeftSidebar.astro2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/docs/src/components/LeftSidebar/LeftSidebar.astro b/examples/docs/src/components/LeftSidebar/LeftSidebar.astro
index bd86aecd4..c9ebe4258 100644
--- a/examples/docs/src/components/LeftSidebar/LeftSidebar.astro
+++ b/examples/docs/src/components/LeftSidebar/LeftSidebar.astro
@@ -7,7 +7,7 @@ type Props = {
};
const { currentPage } = Astro.props as Props;
-const currentPageMatch = currentPage.slice(1);
+const currentPageMatch = currentPage.endsWith('/') ? currentPage.slice(1, -1) : currentPage.slice(1);
const langCode = getLanguageFromURL(currentPage);
const sidebar = SIDEBAR[langCode];
---