diff options
author | sptaule <lecas83@gmail.com> | 2022-02-01 10:44:25 +0100 |
---|---|---|
committer | sptaule <lecas83@gmail.com> | 2022-02-01 10:44:25 +0100 |
commit | cd7d744d9bdf4b56734b3ff186191b64aea26a35 (patch) | |
tree | 7f2add543b52837caa6420079cf4dd5f09bde72f | |
parent | 8306cc774c2e51e039100399cc2950e38ff1e11d (diff) | |
download | garagehq.deuxfleurs.fr-cd7d744d9bdf4b56734b3ff186191b64aea26a35.tar.gz garagehq.deuxfleurs.fr-cd7d744d9bdf4b56734b3ff186191b64aea26a35.zip |
Fix global ToC js error in console
-rw-r--r-- | templates/partials/doc/global_toc_script.html | 6 |
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() { |