Skip to content

Commit 46a3926

Browse files
committed
lib: simplify function process.emitWarning
1 parent 09a50d3 commit 46a3926

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/internal/process/warning.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function writeToFile(message) {
5555
}
5656

5757
function doEmitWarning(warning) {
58-
return () => process.emit('warning', warning);
58+
process.emit('warning', warning);
5959
}
6060

6161
let traceWarningHelperShown = false;
@@ -129,7 +129,7 @@ function emitWarning(warning, type, code, ctor) {
129129
if (process.throwDeprecation)
130130
throw warning;
131131
}
132-
process.nextTick(doEmitWarning(warning));
132+
process.nextTick(doEmitWarning, warning);
133133
}
134134

135135
function emitWarningSync(warning) {

0 commit comments

Comments
 (0)