summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/internal/process/warning.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/internal/process/warning.js b/lib/internal/process/warning.js
index 383bbd7e0f..ebf4c932fa 100644
--- a/lib/internal/process/warning.js
+++ b/lib/internal/process/warning.js
@@ -55,7 +55,7 @@ function writeToFile(message) {
}
function doEmitWarning(warning) {
- return () => process.emit('warning', warning);
+ process.emit('warning', warning);
}
let traceWarningHelperShown = false;
@@ -129,7 +129,7 @@ function emitWarning(warning, type, code, ctor) {
if (process.throwDeprecation)
throw warning;
}
- process.nextTick(doEmitWarning(warning));
+ process.nextTick(doEmitWarning, warning);
}
function emitWarningSync(warning) {