Skip to content

Commit c9954f4

Browse files
committed
fixup: id cannot be const
1 parent f3e8373 commit c9954f4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/fs.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -1642,9 +1642,10 @@ fs.realpathSync = function realpathSync(p, options) {
16421642

16431643
// read the link if it wasn't read before
16441644
// dev/ino always return 0 on windows, so skip the check.
1645-
var linkTarget = null;
1645+
let linkTarget = null;
1646+
let id;
16461647
if (!isWindows) {
1647-
const id = `${stat.dev.toString(32)}:${stat.ino.toString(32)}`;
1648+
id = `${stat.dev.toString(32)}:${stat.ino.toString(32)}`;
16481649
if (seenLinks.hasOwnProperty(id)) {
16491650
linkTarget = seenLinks[id];
16501651
}
@@ -1760,8 +1761,9 @@ fs.realpath = function realpath(p, options, callback) {
17601761
// stat & read the link if not read before
17611762
// call gotTarget as soon as the link target is known
17621763
// dev/ino always return 0 on windows, so skip the check.
1764+
let id;
17631765
if (!isWindows) {
1764-
const id = `${stat.dev.toString(32)}:${stat.ino.toString(32)}`;
1766+
id = `${stat.dev.toString(32)}:${stat.ino.toString(32)}`;
17651767
if (seenLinks.hasOwnProperty(id)) {
17661768
return gotTarget(null, seenLinks[id], base);
17671769
}

0 commit comments

Comments
 (0)