Skip to content

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

fix: silently fail when sync returns false

thecodrrc05d8420ab68
diff --git a/apps/web/src/stores/app-store.js b/apps/web/src/stores/app-store.js
index 7fcd99cba..02527b123 100644
--- a/apps/web/src/stores/app-store.js
+++ b/apps/web/src/stores/app-store.js
@@ -175,8 +175,10 @@ class AppStore extends BaseStore {
this.updateSyncStatus("syncing");
return db
.sync(full, force)
- .then(async () => {
- if (full) this.updateSyncStatus("completed");
+ .then(async (result) => {
+ if (!result) return this.updateSyncStatus("failed");
+ else if (full) this.updateSyncStatus("completed");
+
await this.updateLastSynced();
return await this.refresh();
})