From 3772396b8cb2a2cfe3f6e03c423291003a2ab7ba Mon Sep 17 00:00:00 2001 From: streamich Date: Tue, 17 Mar 2020 00:07:32 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20add=20check=20for=20manag?= =?UTF-8?q?er=20being=20stopped?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui_actions/public/actions/dynamic_action_manager.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/ui_actions/public/actions/dynamic_action_manager.ts b/src/plugins/ui_actions/public/actions/dynamic_action_manager.ts index d9f970c901bc6..a40abb271d85a 100644 --- a/src/plugins/ui_actions/public/actions/dynamic_action_manager.ts +++ b/src/plugins/ui_actions/public/actions/dynamic_action_manager.ts @@ -110,8 +110,11 @@ export class DynamicActionManager { (async () => { const syncId = ++this.syncId; const events = await this.params.storage.list(); + + if (this.stopped) return; if (syncId !== this.syncId) return; if (compareEvents(events, this.ui.get().events)) return; + for (const event of this.ui.get().events) this.killAction(event); for (const event of events) this.reviveAction(event); this.ui.transitions.finishFetching(events);