mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-18 17:31:53 +08:00
fix filing entity changes for deleted notes
This commit is contained in:
parent
e7c6d912a4
commit
346f6edd7e
@ -102,13 +102,14 @@ function fillEntityChanges(entityName, entityPrimaryKey, condition = '') {
|
||||
|
||||
const entity = becca.getEntity(entityName, entityId);
|
||||
|
||||
// entity might be null (not present in becca) when it's deleted
|
||||
addEntityChange({
|
||||
entityName,
|
||||
entityId,
|
||||
hash: entity.generateHash(),
|
||||
hash: entity?.generateHash() || "|deleted",
|
||||
isErased: false,
|
||||
utcDateChanged: entity.getUtcDateChanged(),
|
||||
isSynced: entityName !== 'options' || !!entity.isSynced
|
||||
utcDateChanged: entity?.getUtcDateChanged() || dateUtils.utcNowDateTime(),
|
||||
isSynced: entityName !== 'options' || !!entity?.isSynced
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user