diff options
author | Sashi20 | 2024-03-28 13:27:11 +0530 |
---|---|---|
committer | Sashi20 | 2024-03-28 13:27:11 +0530 |
commit | bedbea036dcbd916a83642eb7b57a9756a62249e (patch) | |
tree | 6884c8f74d3de0cd351918e9b6be7eefd57d1cec | |
parent | dfba7ba781b1fcfb4a194b962bc369d3c932082a (diff) | |
download | animate-2024-bedbea036dcbd916a83642eb7b57a9756a62249e.tar.gz animate-2024-bedbea036dcbd916a83642eb7b57a9756a62249e.tar.bz2 animate-2024-bedbea036dcbd916a83642eb7b57a9756a62249e.zip |
Update locationpathname in js
-rw-r--r-- | src/layouts/layout.astro | 2 |
1 files changed, 1 insertions, 1 deletions
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{ |