File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -57,9 +57,7 @@ const colorRegExp = /\u001b\[\d\d?m/g; // eslint-disable-line no-control-regex
57
57
let uvBinding ;
58
58
59
59
function lazyUv ( ) {
60
- if ( ! uvBinding ) {
61
- uvBinding = internalBinding ( 'uv' ) ;
62
- }
60
+ uvBinding ??= internalBinding ( 'uv' ) ;
63
61
return uvBinding ;
64
62
}
65
63
@@ -297,8 +295,7 @@ function getSystemErrorName(err) {
297
295
}
298
296
299
297
function getSystemErrorMap ( ) {
300
- uvBinding = lazyUv ( ) ;
301
- return uvBinding . getErrorMap ( ) ;
298
+ return lazyUv ( ) . getErrorMap ( ) ;
302
299
}
303
300
304
301
const kCustomPromisifiedSymbol = SymbolFor ( 'nodejs.util.promisify.custom' ) ;
Original file line number Diff line number Diff line change @@ -245,6 +245,7 @@ function getSystemErrorName(err) {
245
245
}
246
246
return internalErrorName ( err ) ;
247
247
}
248
+
248
249
// Keep the `exports =` so that various functions can still be monkeypatched
249
250
module . exports = {
250
251
_errnoException : errnoException ,
You can’t perform that action at this time.
0 commit comments