Skip to content

Commit c27e60b

Browse files
committed
fix: only add toc eventlistener if toc exists
Signed-off-by: David Karlsson <[email protected]>
1 parent 1fb862b commit c27e60b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

assets/js/src/toc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const toc = document.querySelector("#TableOfContents");
1+
const toc = document.querySelector("#TableOfContents .toc");
22
const headings = document.querySelectorAll("main article h2, main article h3");
33

44
if (toc) {

0 commit comments

Comments
 (0)