We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fdbf472 commit 512210fCopy full SHA for 512210f
lib/internal/modules/cjs/loader.js
@@ -88,7 +88,6 @@ let requireDepth = 0;
88
let statCache = new Map();
89
function stat(filename) {
90
filename = path.toNamespacedPath(filename);
91
- if (statCache === null) statCache = new Map();
92
let result = statCache.get(filename);
93
if (result !== undefined) return result;
94
result = internalModuleStat(filename);
@@ -800,6 +799,7 @@ Module.prototype._compile = function(content, filename) {
800
799
var exports = this.exports;
801
var thisValue = exports;
802
var module = this;
+ if (statCache === null) statCache = new Map();
803
if (inspectorWrapper) {
804
result = inspectorWrapper(compiledWrapper, thisValue, exports,
805
require, module, filename, dirname);
0 commit comments