From fb0744f4e1ad08597d194fdf99f5a786cd62569c Mon Sep 17 00:00:00 2001 From: Satya Rohith Date: Wed, 20 Mar 2024 13:22:50 +0530 Subject: fix(ext/node): spread args in setImmediate (#22998) Closes https://github.com/denoland/deno/issues/22997 Co-authored-by: Divy Srivastava --- ext/node/polyfills/internal/timers.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/node/polyfills/internal/timers.mjs') 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. -- cgit v1.2.3