Skip to content

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

fix storage for ios

ammarahm-ed2d4a373a70b2
diff --git a/apps/mobile/src/utils/storage.js b/apps/mobile/src/utils/storage.js
index 098fa04a1..389c0db0c 100644
--- a/apps/mobile/src/utils/storage.js
+++ b/apps/mobile/src/utils/storage.js
@@ -4,7 +4,8 @@ var Aes = NativeModules.Aes;
async function read(key) {
let json = await FastStorage.getItem(key);
- return JSON.parse(json);
+
+ return !json ? undefined : JSON.parse(json);
}
async function write(key, data) {