Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: fix changes in callout heading not causing toc update

Abdullah Atta63be4088a5f2
diff --git a/apps/web/src/components/editor/tiptap.tsx b/apps/web/src/components/editor/tiptap.tsx
index 89dd3c855..b10602a03 100644
--- a/apps/web/src/components/editor/tiptap.tsx
+++ b/apps/web/src/components/editor/tiptap.tsx
@@ -210,7 +210,7 @@ function TipTap(props: TipTapProps) {
},
onUpdate: ({ editor, transaction }) => {
const changedHeadings = getChangedNodes(transaction, {
- descend: false,
+ descend: true,
predicate: (n) => n.isBlock && n.type.name === "heading"
});
if (changedHeadings.length > 0) {