summaryrefslogtreecommitdiff
path: root/ext/node/polyfills
diff options
context:
space:
mode:
authorLuca Casonato <hello@lcas.dev>2023-10-02 21:13:57 +0900
committerGitHub <noreply@github.com>2023-10-02 14:13:57 +0200
commitd5b6c636b09823bfaa97fe8cd382b654d85d2add (patch)
treeaa09124fc49c1a2365118b31ad4f8bf6b9a9796b /ext/node/polyfills
parent6fd2d0841871018bd394ebbdccd4c1f39e5cf773 (diff)
fix(ext/node): don't call undefined nextTick fn (#20724)
The `process` global is not defined in this file. Fixes #20441 --------- Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Diffstat (limited to 'ext/node/polyfills')
-rw-r--r--ext/node/polyfills/_events.mjs3
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) {