Skip to content

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

minor fix on open editor

ammarahm-eddbd47ca93313
diff --git a/apps/mobile/src/views/Editor/index.js b/apps/mobile/src/views/Editor/index.js
index 3b54a49cb..17d288720 100755
--- a/apps/mobile/src/views/Editor/index.js
+++ b/apps/mobile/src/views/Editor/index.js
@@ -44,7 +44,7 @@ const InfoBarRef = createRef();
const EditorWebView = createRef();
let note = {};
let id = null;
-var content = {};
+var content = null;
var title = null;
let timer = null;
let saveCounter = 0;
@@ -246,15 +246,11 @@ const Editor = ({noMenu}) => {
const checkIfContentIsSavable = () => {
if (!canSave) return false;
if (!title && !content) return false;
- if (
- content &&
- content.text.trim().length === 0 &&
- title &&
- title.trim().length == 0
- )
+ if (content && content.text.length === 0 && title && title?.length == 0)
return false;
- if (!content && title && title.trim().length === 0) return false;
- if (!title && content && content.text.trim.length === 0) return false;
+ if (!content && title && title.length === 0) return false;
+ if (!title && content.text.length === 0) return false;
+
if (!content) {
content = {
text: '',