Skip to content

Commit

Permalink
fix erase sync
Browse files Browse the repository at this point in the history
  • Loading branch information
zadam committed Jan 10, 2024
1 parent 2c7b774 commit 76c9873
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/sync_update.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ function updateNormalEntity(remoteEC, remoteEntityRow, instanceId, updateContext
if (localEC?.isErased) {
eraseEntity(remoteEC); // make sure it's erased anyway
updateContext.alreadyErased++;
return false; // we won't save entitychange in this case
} else {
eraseEntity(remoteEC);
updateContext.erased++;
Expand All @@ -91,7 +90,8 @@ function updateNormalEntity(remoteEC, remoteEntityRow, instanceId, updateContext
updateContext.updated[remoteEC.entityName].push(remoteEC.entityId);
}

if (!localEC || localEC.utcDateChanged < remoteEC.utcDateChanged
if (!localEC
|| localEC.utcDateChanged < remoteEC.utcDateChanged
|| localEC.hash !== remoteEC.hash
|| localEC.isErased !== remoteEC.isErased
) {
Expand Down

0 comments on commit 76c9873

Please sign in to comment.