diff --git a/frontend/src/components/MarkdownEditor.tsx b/frontend/src/components/MarkdownEditor.tsx index 3a5ebc13..74bcd484 100644 --- a/frontend/src/components/MarkdownEditor.tsx +++ b/frontend/src/components/MarkdownEditor.tsx @@ -229,7 +229,7 @@ const MarkdownEditor: FC = ({ // Sync external value changes (e.g. when loading saved data) useEffect(() => { - if (!editor) return; + if (!editor || editor.isDestroyed) return; const currentMd = getMarkdown(editor.storage); if (value !== currentMd) { editor.commands.setContent(value);