Skip to content

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

core: do not send PushCompletedV2 if no items sent

Abdullah Atta8c2be0092056
diff --git a/packages/core/src/api/sync/index.ts b/packages/core/src/api/sync/index.ts
index ecb8bb7f6..07f16fb6a 100644
--- a/packages/core/src/api/sync/index.ts
+++ b/packages/core/src/api/sync/index.ts
@@ -300,6 +300,7 @@ export class Sync {
throw new Error(
`Failed to send all items. Sent ${done} out of ${total}.`
);
+ if (total === 0) return false;
await this.connection?.send("PushCompletedV2", deviceId);
return true;
}