style: simplify TableOfContents render condition

This commit is contained in:
Gauthier Daniels 2025-04-21 15:48:54 +02:00
parent 2ee567303f
commit 74f45b7d64

View File

@ -65,10 +65,8 @@ export function TableOfContents() {
if (!section.children) return false;
return (
section.children.findIndex((child) => {
console.log(child.hash, currentSection());
return child.hash === currentSection();
}) !== -1
section.children.findIndex((child) => child.hash === currentSection()) !==
-1
);
}