mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 09:58:32 +02:00
trigger runOnAttributeChange, runOnNoteChange on entity deletions as well
This commit is contained in:
parent
3c19a712c0
commit
581b1fdaa5
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user