diff --git a/src/frontend/apps/impress/src/features/docs/doc-editor/hook/useHeadings.tsx b/src/frontend/apps/impress/src/features/docs/doc-editor/hook/useHeadings.tsx index 9c6084873..9468a7963 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-editor/hook/useHeadings.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-editor/hook/useHeadings.tsx @@ -9,14 +9,11 @@ export const useHeadings = (editor: BlockNoteEditor) => { useEffect(() => { setHeadings(editor); - let timeout: NodeJS.Timeout; editor?.onEditorContentChange(() => { - clearTimeout(timeout); - timeout = setTimeout(() => setHeadings(editor), 200); + setHeadings(editor); }); return () => { - clearTimeout(timeout); resetHeadings(); }; }, [editor, resetHeadings, setHeadings]);