mirror of
https://github.com/inventree/InvenTree.git
synced 2026-09-02 10:18:42 +00:00
Fix for NotesEditor
This commit is contained in:
@@ -200,7 +200,7 @@ export default function NotesEditor({
|
|||||||
const note = notesQuery.data?.find((note: any) => note.pk === noteId);
|
const note = notesQuery.data?.find((note: any) => note.pk === noteId);
|
||||||
setSelectedNote(note);
|
setSelectedNote(note);
|
||||||
|
|
||||||
if (editor) {
|
if (editor && !editor.isDestroyed) {
|
||||||
// Pass emitUpdate:false to avoid triggering dirty state when loading content
|
// Pass emitUpdate:false to avoid triggering dirty state when loading content
|
||||||
editor.commands.setContent(
|
editor.commands.setContent(
|
||||||
note ? DOMPurify.sanitize(note.content ?? '') : '',
|
note ? DOMPurify.sanitize(note.content ?? '') : '',
|
||||||
|
|||||||
Reference in New Issue
Block a user