fix(toc): equations sometimes duplicated

This commit is contained in:
Elian Doran
2026-04-10 23:01:07 +03:00
parent c435050018
commit 3d2fa57873

View File

@@ -87,7 +87,7 @@ function TableOfContentsHeading({ heading, scrollToHeading, activeHeadingId }: {
// Render math equations after component mounts/updates
useEffect(() => {
if (!contentRef.current) return;
const mathElements = contentRef.current.querySelectorAll(".ck-math-tex");
const mathElements = contentRef.current.querySelectorAll(".math-tex");
for (const mathEl of mathElements ?? []) {
try {