Skip to content

Commit

Permalink
Fix section toc building
Browse files Browse the repository at this point in the history
  • Loading branch information
augustuswm committed Dec 20, 2024
1 parent d79a566 commit aa330bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/routes/rfd.$slug.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit aa330bd

Please sign in to comment.