Skip to content

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

add workaround of user not logged in when syncing

ammarahm-ed18e488e40f74
diff --git a/apps/mobile/App.js b/apps/mobile/App.js
index 130b9c9a3..1660922db 100644
--- a/apps/mobile/App.js
+++ b/apps/mobile/App.js
@@ -51,11 +51,17 @@ const App = () => {
const _syncFunc = async () => {
dispatch({type: ACTIONS.SYNCING, syncing: true});
- await db.sync();
let u = await db.user.get();
+ try {
+ await db.sync();
+ } catch(e) {
+
+ }
+ u = await db.user.get();
dispatch({type: ACTIONS.USER, user: u});
dispatch({type: ACTIONS.ALL});
dispatch({type: ACTIONS.SYNCING, syncing: false});
+
};
useEffect(() => {