diff options
author | 2022-09-29 17:45:00 +0530 | |
---|---|---|
committer | 2022-09-29 08:15:00 -0400 | |
commit | d8e796e9604231a58dfa84abe163c5dd488d57e3 (patch) | |
tree | e137ace30942e02b0e74c4748d5d1c4eb65b5ae8 /examples/docs/src | |
parent | 670d4bed4503fc2972343e93f51481c1a81bb3a7 (diff) | |
download | astro-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.astro | 2 |
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]; --- |