Skip to content

Commit 37093ca

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

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/helpers.js

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

407-
const finalIdArray = Array.from(finalIds).slice(-100);
408-
409407
// --- Upload Phase ---
410-
// 3. Only upload if the list has actually changed
411-
const hasChanged = finalIdArray.length !== initialMasterIds.size || !finalIdArray.every(id => initialMasterIds.has(id));
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));
410+
411+
const finalIdArray = Array.from(finalIds).slice(-100);
412412

413413
if (hasChanged) {
414414
console.log('Deleted notes list has changed, uploading to all providers.');

0 commit comments

Comments
 (0)