From bedbea036dcbd916a83642eb7b57a9756a62249e Mon Sep 17 00:00:00 2001 From: Sashi20 Date: Thu, 28 Mar 2024 13:27:11 +0530 Subject: Update locationpathname in js --- src/layouts/layout.astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layouts/layout.astro b/src/layouts/layout.astro index 74246ac..5d9fac8 100644 --- a/src/layouts/layout.astro +++ b/src/layouts/layout.astro @@ -173,7 +173,7 @@ ul.menu li a.active{ document.addEventListener('astro:page-load', () => { if(window.location.hash){ -var currentUrl = window.location.pathname + window.location.hash.replace(/\/+$/, ''); +var currentUrl = window.location.pathname.replace(/\/+$/, '') + window.location.hash.replace(/\/+$/, ''); } else{ -- cgit