diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-09-12 19:14:44 +0800 |
---|---|---|
committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-09-12 19:14:44 +0800 |
commit | 01d78947793e0ee6f0b0dcbd0af072a7c9be9232 (patch) | |
tree | 786f385210f54dda9a5d0b61862ebc2fce32931a /utils | |
parent | 8e7d6d4a6be5af3b377ff179d0d074ac5351ada0 (diff) | |
download | SoopyV2-01d78947793e0ee6f0b0dcbd0af072a7c9be9232.tar.gz SoopyV2-01d78947793e0ee6f0b0dcbd0af072a7c9be9232.tar.bz2 SoopyV2-01d78947793e0ee6f0b0dcbd0af072a7c9be9232.zip |
fix potential race condition
Diffstat (limited to 'utils')
-rw-r--r-- | utils/delayUtils.js | 2 |
1 files changed, 1 insertions, 1 deletions
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", () => { |