We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 454ae14 commit bfafec5Copy full SHA for bfafec5
theme/toc.js.hbs
@@ -35,10 +35,8 @@ class MDBookSidebarScrollbox extends HTMLElement {
35
parent.classList.add("expanded");
36
}
37
while (parent) {
38
- if (parent.tagName === "LI" && parent.previousElementSibling) {
39
- if (parent.previousElementSibling.classList.contains("chapter-item")) {
40
- parent.previousElementSibling.classList.add("expanded");
41
- }
+ if (parent.tagName === "LI" && parent.classList.contains("chapter-item")) {
+ parent.classList.add("expanded");
42
43
parent = parent.parentElement;
44
0 commit comments