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; if (!section.children) return false;
return ( return (
section.children.findIndex((child) => { section.children.findIndex((child) => child.hash === currentSection()) !==
console.log(child.hash, currentSection()); -1
return child.hash === currentSection();
}) !== -1
); );
} }