mirror of
https://github.com/zadam/trilium.git
synced 2025-11-12 00:05:50 +01:00
fixes in frontend sync
This commit is contained in:
@@ -69,14 +69,14 @@ eventService.subscribe([eventService.ENTITY_CHANGE_SYNCED], ({entityName, entit
|
||||
const EntityClass = entityConstructor.getEntityFromEntityName(entityName);
|
||||
const primaryKeyName = EntityClass.primaryKeyName;
|
||||
|
||||
let entity = becca.getEntity(entityName, entity[primaryKeyName]);
|
||||
let beccaEntity = becca.getEntity(entityName, entity[primaryKeyName]);
|
||||
|
||||
if (entity) {
|
||||
entity.updateFromRow(entity);
|
||||
if (beccaEntity) {
|
||||
beccaEntity.updateFromRow(entity);
|
||||
} else {
|
||||
entity = new EntityClass();
|
||||
entity.updateFromRow(entity);
|
||||
entity.init();
|
||||
beccaEntity = new EntityClass();
|
||||
beccaEntity.updateFromRow(entity);
|
||||
beccaEntity.init();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user