Skip to content

Commit

Permalink
changed shouldUpdateRecord condition since it makes more sense
Browse files Browse the repository at this point in the history
  • Loading branch information
primus11 committed Mar 2, 2023
1 parent 6470faf commit 120d397
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sync/impl/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ export function requiresUpdate<T: Model>(
shouldUpdateRecord?: SyncShouldUpdateRecord,
): boolean {
if (shouldUpdateRecord) {
return shouldUpdateRecord(collection.table, local, dirtyRemote)
if (!shouldUpdateRecord(collection.table, local, dirtyRemote)) {
return false;
}
}

if (local._status !== 'synced') {
Expand Down

0 comments on commit 120d397

Please sign in to comment.