Skip to content

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

fix error when getting note on app state change

ammarahm-edd52c54350bc0
diff --git a/apps/mobile/AppRootEvents.js b/apps/mobile/AppRootEvents.js
index bd409ab09..7cec1bc13 100644
--- a/apps/mobile/AppRootEvents.js
+++ b/apps/mobile/AppRootEvents.js
@@ -91,7 +91,7 @@ const onAppStateChanged = async (state) => {
await MMKV.removeItem('appState');
}
} else {
- if (getNote().locked) {
+ if (getNote()?.locked) {
eSendEvent(eClearEditor);
}
await storeAppState();