summaryrefslogtreecommitdiff
path: root/examples/docs/src
diff options
context:
space:
mode:
authorGravatar Rishi Raj Jain <rishi18304@iiitd.ac.in> 2022-09-29 17:45:00 +0530
committerGravatar GitHub <noreply@github.com> 2022-09-29 08:15:00 -0400
commitd8e796e9604231a58dfa84abe163c5dd488d57e3 (patch)
treee137ace30942e02b0e74c4748d5d1c4eb65b5ae8 /examples/docs/src
parent670d4bed4503fc2972343e93f51481c1a81bb3a7 (diff)
downloadastro-d8e796e9604231a58dfa84abe163c5dd488d57e3.tar.gz
astro-d8e796e9604231a58dfa84abe163c5dd488d57e3.tar.zst
astro-d8e796e9604231a58dfa84abe163c5dd488d57e3.zip
fix trailing slash mismatch in dev vs build in docs example (#4912)
Diffstat (limited to 'examples/docs/src')
-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];
---