diff --git a/src/components/TocWrapper.astro b/src/components/TocWrapper.astro index fa292c0..9f7c9a0 100644 --- a/src/components/TocWrapper.astro +++ b/src/components/TocWrapper.astro @@ -8,6 +8,7 @@ interface Props { } const { toc, headings } = Astro.props; +const minDepth = Math.min(...headings.map((heading) => heading.depth)); --- { @@ -20,7 +21,7 @@ const { toc, headings } = Astro.props;