Skip to content

Commit

Permalink
extract pathname from href
Browse files Browse the repository at this point in the history
  • Loading branch information
Mukhtar Mukhtar committed Sep 27, 2024
1 parent 6722932 commit 9dd853a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pages/_includes/statewide-footer.njk
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,13 @@ if (queryDiv) {
var href = link.getAttribute('href');
// Extract pathname from href
var hrefPathname = new URL(href).pathname;
// Check if the href matches the current pathname
if (href === currentPathname) {
if (hrefPathname === currentPathname) {
// Remove the 'li' element if the href matches
Expand Down

0 comments on commit 9dd853a

Please sign in to comment.