Skip to content

Commit

Permalink
fix: πŸ› add check for manager being stopped
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Mar 16, 2020
1 parent f658105 commit 3772396
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3772396

Please sign in to comment.