Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(toc): equations sometimes duplicated
Elian Doran3d2fa578739c
diff --git a/apps/client/src/widgets/sidebar/TableOfContents.tsx b/apps/client/src/widgets/sidebar/TableOfContents.tsxindex fdf616ee26..eef19100eb 100644--- a/apps/client/src/widgets/sidebar/TableOfContents.tsx+++ b/apps/client/src/widgets/sidebar/TableOfContents.tsx@@ -87,7 +87,7 @@ function TableOfContentsHeading({ heading, scrollToHeading, activeHeadingId }: {// Render math equations after component mounts/updatesuseEffect(() => {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 {