Skip to content

Commit 7cf71d1

Browse files
author
Manuel Mujica
committed
Pass the first match an not the whole collection
1 parent 6049a86 commit 7cf71d1

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)