mirror of
https://github.com/zadam/trilium.git
synced 2025-02-24 15:05:31 +08:00
entity deleltion should not trigger ENTITY_CHANGED event, it should be separate event
This commit is contained in:
parent
b009bcb6a0
commit
3bb021fba1
1 changed files with 7 additions and 4 deletions
|
@ -95,10 +95,13 @@ async function updateEntity(entity) {
|
|||
});
|
||||
}
|
||||
|
||||
await eventService.emit(eventService.ENTITY_CHANGED, {
|
||||
entityName,
|
||||
entity
|
||||
});
|
||||
// it seems to be better to handle deletion with a separate event
|
||||
if (!entity.isDeleted) {
|
||||
await eventService.emit(eventService.ENTITY_CHANGED, {
|
||||
entityName,
|
||||
entity
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue