style: simplify TableOfContents render condition
This commit is contained in:
parent
2ee567303f
commit
74f45b7d64
@ -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
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user