From 74f45b7d64ceb86704121d7718e160e77ddcd356 Mon Sep 17 00:00:00 2001 From: GauthierWebDev Date: Mon, 21 Apr 2025 15:48:54 +0200 Subject: [PATCH] style: simplify TableOfContents render condition --- app/partials/TableOfContents.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/partials/TableOfContents.tsx b/app/partials/TableOfContents.tsx index c3d297d..fd386e7 100644 --- a/app/partials/TableOfContents.tsx +++ b/app/partials/TableOfContents.tsx @@ -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 ); }