summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/internal/timers.mjs
diff options
context:
space:
mode:
authorSatya Rohith <me@satyarohith.com>2024-03-20 13:22:50 +0530
committerGitHub <noreply@github.com>2024-03-20 07:52:50 +0000
commitfb0744f4e1ad08597d194fdf99f5a786cd62569c (patch)
tree1526df346f6e941c117b050537e49e452454f648 /ext/node/polyfills/internal/timers.mjs
parent724cdcec7bcee49fdd0f34b35fbfbbf556c7eda3 (diff)
fix(ext/node): spread args in setImmediate (#22998)
Closes https://github.com/denoland/deno/issues/22997 Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
Diffstat (limited to 'ext/node/polyfills/internal/timers.mjs')
-rw-r--r--ext/node/polyfills/internal/timers.mjs4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/node/polyfills/internal/timers.mjs b/ext/node/polyfills/internal/timers.mjs
index bdaf95d91..bdf258de6 100644
--- a/ext/node/polyfills/internal/timers.mjs
+++ b/ext/node/polyfills/internal/timers.mjs
@@ -117,8 +117,8 @@ Timeout.prototype[Symbol.toPrimitive] = function () {
};
// Immediate constructor function.
-export function Immediate(callback, args) {
- this._immediateId = setImmediate_(callback, args);
+export function Immediate(callback, ...args) {
+ this._immediateId = setImmediate_(callback, ...args);
}
// Make sure the linked list only shows the minimal necessary information.