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
5757let uvBinding ;
5858
5959function lazyUv ( ) {
60- if ( ! uvBinding ) {
61- uvBinding = internalBinding ( 'uv' ) ;
62- }
60+ uvBinding ??= internalBinding ( 'uv' ) ;
6361 return uvBinding ;
6462}
6563
@@ -297,8 +295,7 @@ function getSystemErrorName(err) {
297295}
298296
299297function getSystemErrorMap ( ) {
300- uvBinding = lazyUv ( ) ;
301- return uvBinding . getErrorMap ( ) ;
298+ return lazyUv ( ) . getErrorMap ( ) ;
302299}
303300
304301const kCustomPromisifiedSymbol = SymbolFor ( 'nodejs.util.promisify.custom' ) ;
Original file line number Diff line number Diff line change @@ -245,6 +245,7 @@ function getSystemErrorName(err) {
245245 }
246246 return internalErrorName ( err ) ;
247247}
248+
248249// Keep the `exports =` so that various functions can still be monkeypatched
249250module . exports = {
250251 _errnoException : errnoException ,
You can’t perform that action at this time.
0 commit comments