Skip to content

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

editor: fix crash when app is unlocked after a relock (#9698)

01zulfid6f7f0c0beb7
diff --git a/packages/editor/src/hooks/use-editor.ts b/packages/editor/src/hooks/use-editor.ts
index 1e4022b1a..e8d6b83b7 100644
--- a/packages/editor/src/hooks/use-editor.ts
+++ b/packages/editor/src/hooks/use-editor.ts
@@ -121,6 +121,7 @@ export const useEditor = (
function destroyView(view: EditorView) {
// we override all the methods to prevent any further interaction with the
// editor, otherwise we'll get errors.
+ view.focus = () => {};
view.dispatch = () => {};
view.update = () => {};
view.updateState = () => {};