Skip to content

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

mobile: check if editorController.current is undefined

Ammar Ahmed2b9381d40e19
diff --git a/apps/mobile/app/screens/editor/tiptap/commands.ts b/apps/mobile/app/screens/editor/tiptap/commands.ts
index b9c2fd313..954326d6a 100644
--- a/apps/mobile/app/screens/editor/tiptap/commands.ts
+++ b/apps/mobile/app/screens/editor/tiptap/commands.ts
@@ -127,7 +127,7 @@ if (typeof editor !== "undefined") {
}
typeof editorTitle !== "undefined" && editorTitle.current && editorTitle.current?.blur();
-if (editorController.content) editorController.content.current = null;
+if (typeof editorController.content !== undefined) editorController.content.current = null;
editorController.onUpdate();
editorController.setTitle(null);
if (typeof statusBar !== "undefined") {