diff --git a/lib/fs.js b/lib/fs.js index b0581927514888..3c1e964d22d815 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -1562,6 +1562,7 @@ if (isWindows) { } const emptyObj = ObjectCreate(null); +const knownHard = ObjectCreate(null); function realpathSync(p, options) { if (!options) options = emptyObj; @@ -1581,7 +1582,6 @@ function realpathSync(p, options) { } const seenLinks = ObjectCreate(null); - const knownHard = ObjectCreate(null); const original = p; // Current character position in p