Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

editor: do not touch editor when its view is destroyed

Abdullah Atta6184281694bc
diff --git a/packages/editor/src/hooks/use-editor.ts b/packages/editor/src/hooks/use-editor.ts
index 025c9ec24..6c56208aa 100644
--- a/packages/editor/src/hooks/use-editor.ts
+++ b/packages/editor/src/hooks/use-editor.ts
@@ -43,6 +43,8 @@ export const useEditor = (
useEffect(
() => {
+ if (editor.view.isDestroyed) return;
+
let isMounted = true;
let updateTimeout: number;