Skip to content

Build your personal knowledge base with Trilium Notes

fix erase sync

zadam76c98737059b
diff --git a/src/services/sync_update.js b/src/services/sync_update.js
index c1938a2323..94091e9eff 100644
--- a/src/services/sync_update.js
+++ b/src/services/sync_update.js
@@ -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++;
@@ -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
) {