Skip to content

Commit 66e7490

Browse files
author
tung-ideapad
committed
fix masterList / hasChanged
1 parent 32feb53 commit 66e7490

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/helpers.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -414,9 +414,7 @@ async function syncDeletedNoteIds({deletedNoteIds, credentials, gitCredentials,
414414
// 1. Find the master list (most recent)
415415
let masterList = { ids: [], updatedAt: '1970-01-01T00:00:00.000Z' };
416416
if (remoteLists.length > 0) {
417-
masterList = remoteLists.reduce((newest, current) => {
418-
return new Date(current.updatedAt) > new Date(newest.updatedAt) ? current : newest;
419-
});
417+
masterList.ids = remoteLists.map(x => x.ids).flat();
420418
}
421419

422420
// 2. Merge local and other remote IDs into the master list

0 commit comments

Comments
 (0)