Skip to content

Commit dd168b4

Browse files
author
djinni-hppro
committed
.
1 parent 37093ca commit dd168b4

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/helpers.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,10 @@ async function syncDeletedNoteIds({deletedNoteIds, credentials, gitCredentials,
405405
});
406406

407407
// --- Upload Phase ---
408-
// 3. Only upload if the merged set differs from the master (most recent remote state)
409-
const hasChanged = finalIds.size !== initialMasterIds.size || ![...finalIds].every(id => initialMasterIds.has(id));
408+
// 3. Only upload if the merged set differs from what we started with
409+
const hasChanged = remoteLists.length === 0
410+
? false // No remote providers, nothing to sync
411+
: (finalIds.size !== initialMasterIds.size || ![...finalIds].every(id => initialMasterIds.has(id)));
410412

411413
const finalIdArray = Array.from(finalIds).slice(-100);
412414

0 commit comments

Comments
 (0)