From e11f8a4e0f8a295790c507f05ad1c4c22932e054 Mon Sep 17 00:00:00 2001 From: MapleLeaf <19603573+itsMapleLeaf@users.noreply.github.com> Date: Thu, 23 Dec 2021 09:39:34 -0600 Subject: [PATCH] remove action queue optimization --- src/action-queue.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/action-queue.ts b/src/action-queue.ts index 61ab32d..4fdfca1 100644 --- a/src/action-queue.ts +++ b/src/action-queue.ts @@ -9,15 +9,8 @@ export class ActionQueue { private runningPromise?: Promise add(action: Action) { - const lastAction = this.actions[this.actions.length - 1] - if (lastAction?.id === action.id) { - this.actions[this.actions.length - 1] = action - } else { - this.actions.push(action) - } - + this.actions.push(action) this.actions.sort((a, b) => a.priority - b.priority) - this.runActions() }