diff --git a/apps/web/src/components/editor/tiptap.tsx b/apps/web/src/components/editor/tiptap.tsx index b61e1bf0e..7eeafd7c4 100644 --- a/apps/web/src/components/editor/tiptap.tsx +++ b/apps/web/src/components/editor/tiptap.tsx @@ -367,7 +367,10 @@ function TipTap(props: TipTapProps) { if (ignoreEdit || preventSave || !editor.isEditable || !onChange) return; - if (!autoSave.current) return; + if (!autoSave.current) { + onAutoSaveDisabled(); + return; + } onChange( () => @@ -571,9 +574,6 @@ function TipTap(props: TipTapProps) { useEffect(() => { const update = (totalWords?: number) => { autoSave.current = !totalWords || totalWords < MAX_AUTO_SAVEABLE_WORDS; - if (!autoSave.current) { - onAutoSaveDisabled(); - } }; // The editor's statistics are set from `onCreate`, which runs before this