Skip to content

Commit 0bf6751

Browse files
authored
Merge pull request #2517 from notriddle/master
Ignore fragment when figuring out sidebar items
2 parents 59e6afc + f92eac4 commit 0bf6751

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/theme/toc.js.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class MDBookSidebarScrollbox extends HTMLElement {
1010
connectedCallback() {
1111
this.innerHTML = '{{#toc}}{{/toc}}';
1212
// Set the current, active page, and reveal it if it's hidden
13-
let current_page = document.location.href.toString();
13+
let current_page = document.location.href.toString().split("#")[0];
1414
if (current_page.endsWith("/")) {
1515
current_page += "index.html";
1616
}

0 commit comments

Comments
 (0)