From 01d78947793e0ee6f0b0dcbd0af072a7c9be9232 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Mon, 12 Sep 2022 19:14:44 +0800 Subject: fix potential race condition --- utils/delayUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/delayUtils.js b/utils/delayUtils.js index 6604203..3ec6d95 100644 --- a/utils/delayUtils.js +++ b/utils/delayUtils.js @@ -8,8 +8,8 @@ if (!global.delayThingSoopy) { function delay(time, callback) { let id = functionId++ - functionQueue.push(id, Date.now() + time) functions.set(id, callback) + functionQueue.push(id, Date.now() + time) } register("tick", () => { -- cgit