From aa330bdfcd859693fe94d39fa242e1c414c53047 Mon Sep 17 00:00:00 2001 From: Augustus Mayo Date: Thu, 19 Dec 2024 21:36:43 -0600 Subject: [PATCH] Fix section toc building --- app/routes/rfd.$slug.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/routes/rfd.$slug.tsx b/app/routes/rfd.$slug.tsx index 23f9068..0682875 100644 --- a/app/routes/rfd.$slug.tsx +++ b/app/routes/rfd.$slug.tsx @@ -164,7 +164,7 @@ export default function Rfd() { useEffect(() => { let headings = flattenSections(content.sections) .filter((item) => item.level <= 2) - .map((item) => bodyRef.current?.querySelector(`#${item.id}`)) + .map((item) => document.getElementById(item.id)) .filter(isValue) setSections(headings)