diff --git a/src/frontend/src/components/editors/NotesEditor.tsx b/src/frontend/src/components/editors/NotesEditor.tsx index ffd9fff902..3f8cd7e2ff 100644 --- a/src/frontend/src/components/editors/NotesEditor.tsx +++ b/src/frontend/src/components/editors/NotesEditor.tsx @@ -200,7 +200,7 @@ export default function NotesEditor({ const note = notesQuery.data?.find((note: any) => note.pk === noteId); setSelectedNote(note); - if (editor) { + if (editor && !editor.isDestroyed) { // Pass emitUpdate:false to avoid triggering dirty state when loading content editor.commands.setContent( note ? DOMPurify.sanitize(note.content ?? '') : '',