mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
fs: refactor to use ES2020 syntax
PR-URL: https://github.com/nodejs/node/pull/41903 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
1 parent
6fc0a25b64
commit
2d165652f1
1 file changed
+2
-3
@@ -2516,7 +2516,7 @@ function realpathSync(p, options) {
|
||||
}
|
||||
resolvedLink = pathModule.resolve(previous, linkTarget);
|
||||
|
||||
if (cache) cache.set(base, resolvedLink);
|
||||
cache?.set(base, resolvedLink);
|
||||
if (!isWindows) seenLinks[id] = linkTarget;
|
||||
}
|
||||
|
||||
@@ -3041,8 +3041,7 @@ ObjectDefineProperties(fs, {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
get() {
|
||||
if (promises === null)
|
||||
promises = require('internal/fs/promises').exports;
|
||||
promises ??= require('internal/fs/promises').exports;
|
||||
return promises;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user