Fix logic error in toc-scroll
This commit is contained in:
parent
7daa7aceb3
commit
bce2b50556
@ -88,7 +88,7 @@ $(function() {
|
|||||||
|
|
||||||
var tocElement = document.querySelector("aside.sidebar__right.sticky");
|
var tocElement = document.querySelector("aside.sidebar__right.sticky");
|
||||||
if (!tocElement) return;
|
if (!tocElement) return;
|
||||||
if (!window.getComputedStyle(tocElement).position !== "sticky") return;
|
if (window.getComputedStyle(tocElement).position !== "sticky") return;
|
||||||
|
|
||||||
if (target.parentElement.classList.contains("toc__menu") && target == target.parentElement.firstElementChild) {
|
if (target.parentElement.classList.contains("toc__menu") && target == target.parentElement.firstElementChild) {
|
||||||
// Scroll to top instead
|
// Scroll to top instead
|
||||||
|
2
assets/js/main.min.js
vendored
2
assets/js/main.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user