diff options
Diffstat (limited to 'examples/docs/src/layouts/MainLayout.astro')
-rw-r--r-- | examples/docs/src/layouts/MainLayout.astro | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/docs/src/layouts/MainLayout.astro b/examples/docs/src/layouts/MainLayout.astro index 8c46278fe..9939592a9 100644 --- a/examples/docs/src/layouts/MainLayout.astro +++ b/examples/docs/src/layouts/MainLayout.astro @@ -9,7 +9,7 @@ import RightSidebar from '../components/RightSidebar/RightSidebar.astro'; import * as CONFIG from '../config'; const { content = {} } = Astro.props; -const currentPage = Astro.request.url.pathname; +const currentPage = new URL(Astro.request.url).pathname; const currentFile = `src/pages${currentPage.replace(/\/$/, '')}.md`; const githubEditUrl = CONFIG.GITHUB_EDIT_URL && CONFIG.GITHUB_EDIT_URL + currentFile; --- |