Attempt to fix syntax error for toc js

This commit is contained in:
alistair3149 2020-02-15 18:45:56 -05:00
parent 7397d8bba8
commit c72c834fa2
No known key found for this signature in database
GPG key ID: 94D081060FD3DD9C

View file

@ -36,7 +36,7 @@ function ScrollSpy() {
sections[section].offsetTop <= scrollPos
) {
id = mw.util.escapeIdForAttribute(sections[section].id);
node = document.querySelector("a[href * = " + id + "]").parentNode;
node = document.querySelector("a[href * = '" + id + "']").parentNode;
active = document.querySelector(".active");
if (active !== null) {
active.classList.remove("active");