mirror of
https://git.sr.ht/~ashkeel/strimertul-website
synced 2024-12-21 23:12:19 +00:00
fix toc glitch
This commit is contained in:
parent
a0fc21db39
commit
1654191f87
1 changed files with 3 additions and 1 deletions
|
@ -18,7 +18,9 @@ if (toc) {
|
|||
(i) => getId(i.target) && i.intersectionRatio > 0
|
||||
);
|
||||
if (filtered.length > 0) {
|
||||
toc.querySelector(`li.active`)?.classList.remove("active");
|
||||
toc
|
||||
.querySelectorAll(`li.active`)
|
||||
.forEach((entry) => entry.classList.remove("active"));
|
||||
filtered.forEach((entry) => {
|
||||
const id = getId(entry.target);
|
||||
toc
|
||||
|
|
Loading…
Reference in a new issue