Skip to content

Commit 5dae39a

Browse files
author
Manuel Mujica
authored
Merge pull request #15 from bit-docs/fix-bug
Pass the first match an not the whole collection
2 parents 6049a86 + 7cf71d1 commit 5dae39a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

toc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ var TOCContainer = require("./toc-container-control");
33
var el = document.getElementsByClassName("on-this-page-container");
44

55
if (el.length) {
6-
new TOCContainer(el);
6+
new TOCContainer(el.item(0));
77
} else {
88
console.log("An element with class 'on-this-page-container' is required");
99
}

0 commit comments

Comments
 (0)