mirror of
https://github.com/zadam/trilium.git
synced 2025-11-05 04:45:47 +01:00
trigger runOnAttributeChange, runOnNoteChange on entity deletions as well
This commit is contained in:
@@ -37,7 +37,7 @@ eventService.subscribe(eventService.NOTE_TITLE_CHANGED, async note => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
eventService.subscribe(eventService.ENTITY_CHANGED, async ({ entityName, entity }) => {
|
eventService.subscribe([ eventService.ENTITY_CHANGED, eventService.ENTITY_DELETED ], async ({ entityName, entity }) => {
|
||||||
if (entityName === 'attributes') {
|
if (entityName === 'attributes') {
|
||||||
await runAttachedRelations(await entity.getNote(), 'runOnAttributeChange', entity);
|
await runAttachedRelations(await entity.getNote(), 'runOnAttributeChange', entity);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user