Skip to content

Commit

Permalink
fix: avoid changing non-menu links state (#730)
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang authored Nov 5, 2024
1 parent f03f502 commit 5a42f8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/hb/modules/header/js/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import "js/bootstrap/src/offcanvas";
return window.location.href.indexOf(href) !== -1 || window.location.pathname.indexOf(href) !== -1
}

const menus = nav.querySelectorAll(`a[href="${window.location.href}"], a[href="${window.location.pathname}"]`)
const menus = nav.querySelectorAll(`.hb-header-menus a[href="${window.location.href}"],.hb-header-menus a[href="${window.location.pathname}"]`)
if (menus.length > 0) {
menus.forEach(menu => {
activeMenu(menu)
Expand Down

0 comments on commit 5a42f8f

Please sign in to comment.