From 581b1fdaa5f1c89956aa38a328df4ac5179a3ba8 Mon Sep 17 00:00:00 2001 From: azivner Date: Fri, 11 Jan 2019 23:43:22 +0100 Subject: [PATCH] trigger runOnAttributeChange, runOnNoteChange on entity deletions as well --- src/services/handlers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/handlers.js b/src/services/handlers.js index 4c7857493..faaba467b 100644 --- a/src/services/handlers.js +++ b/src/services/handlers.js @@ -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') { await runAttachedRelations(await entity.getNote(), 'runOnAttributeChange', entity); }