Fix error in ToC script at the bottom of the page (#2002)

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
pull/1915/merge
Kévin Commaille 2 days ago committed by GitHub
parent 0ce83512fc
commit 0657cc1848
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -107,6 +107,11 @@ function getCurrentHeading(headings, headerOffset) {
index += 1; index += 1;
} }
// At the bottom of the page we might not have a heading.
if (!currentHeading) {
currentHeading = prevHeading;
}
return currentHeading; return currentHeading;
} }

@ -0,0 +1 @@
Improve the JS script to highlight the current ToC entry.
Loading…
Cancel
Save