Skip to content

Commit c2d8ca2

Browse files
committed
utils/Minify.js: always call statFile() with an explicit value for "dirStatLimit"
In this way the only external call to statFile() provides an explicit value for "dirStatLimit", and thus the initial check on "undefined" at the start of the function could be removed (just added a comment for now).
1 parent cdd4978 commit c2d8ca2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/node/utils/Minify.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ function minify(req, res)
240240
res.end();
241241
}
242242
}
243-
});
243+
}, 3);
244244
}
245245

246246
// find all includes in ace.js and embed them.
@@ -287,6 +287,10 @@ function getAceFile(callback) {
287287

288288
// Check for the existance of the file and get the last modification date.
289289
function statFile(filename, callback, dirStatLimit) {
290+
/*
291+
* The only external call to this function provides an explicit value for
292+
* dirStatLimit: this check could be removed.
293+
*/
290294
if (typeof dirStatLimit === 'undefined') {
291295
dirStatLimit = 3;
292296
}

0 commit comments

Comments
 (0)