aboutsummaryrefslogtreecommitdiff
path: root/templates/partials/doc/global_toc_script.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/partials/doc/global_toc_script.html')
-rw-r--r--templates/partials/doc/global_toc_script.html6
1 files changed, 4 insertions, 2 deletions
diff --git a/templates/partials/doc/global_toc_script.html b/templates/partials/doc/global_toc_script.html
index 42abcda..8b23fec 100644
--- a/templates/partials/doc/global_toc_script.html
+++ b/templates/partials/doc/global_toc_script.html
@@ -16,8 +16,10 @@ document.addEventListener("DOMContentLoaded", function() {
if (parentMenu.classList.contains('subMenu')) { // child
parentMenu.previousElementSibling.previousElementSibling.checked = false;
} else { // parent
- activeDocPage.nextElementSibling.checked = false;
- }
+ if (activeDocPage.nextElementSibling) {
+ activeDocPage.nextElementSibling.checked = false;
+ }
+ }
});
window.addEventListener('scroll', function() {