diff options
Diffstat (limited to 'ext/node/polyfills/_events.mjs')
-rw-r--r-- | ext/node/polyfills/_events.mjs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/node/polyfills/_events.mjs b/ext/node/polyfills/_events.mjs index b6f372723..bd9e92d06 100644 --- a/ext/node/polyfills/_events.mjs +++ b/ext/node/polyfills/_events.mjs @@ -42,6 +42,7 @@ import { validateFunction, } from "ext:deno_node/internal/validators.mjs"; import { spliceOne } from "ext:deno_node/_utils.ts"; +import { nextTick } from "ext:deno_node/_process/process.ts"; const kCapture = Symbol("kCapture"); const kErrorMonitor = Symbol("events.errorMonitor"); @@ -206,7 +207,7 @@ function addCatch(that, promise, type, args) { then.call(promise, undefined, function (err) { // The callback is called with nextTick to avoid a follow-up // rejection from this promise. - process.nextTick(emitUnhandledRejectionOrErr, that, err, type, args); + nextTick(emitUnhandledRejectionOrErr, that, err, type, args); }); } } catch (err) { |