aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorsptaule <lecas83@gmail.com>2022-02-01 10:44:25 +0100
committersptaule <lecas83@gmail.com>2022-02-01 10:44:25 +0100
commitcd7d744d9bdf4b56734b3ff186191b64aea26a35 (patch)
tree7f2add543b52837caa6420079cf4dd5f09bde72f /templates
parent8306cc774c2e51e039100399cc2950e38ff1e11d (diff)
downloadgaragehq.deuxfleurs.fr-cd7d744d9bdf4b56734b3ff186191b64aea26a35.tar.gz
garagehq.deuxfleurs.fr-cd7d744d9bdf4b56734b3ff186191b64aea26a35.zip
Fix global ToC js error in console
Diffstat (limited to 'templates')
-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() {