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).
This commit is contained in:
muxator 2019-03-26 23:58:14 +01:00 committed by muxator
parent cdd4978973
commit c2d8ca212b

View file

@ -240,7 +240,7 @@ function minify(req, res)
res.end(); res.end();
} }
} }
}); }, 3);
} }
// find all includes in ace.js and embed them. // find all includes in ace.js and embed them.
@ -287,6 +287,10 @@ function getAceFile(callback) {
// Check for the existance of the file and get the last modification date. // Check for the existance of the file and get the last modification date.
function statFile(filename, callback, dirStatLimit) { function statFile(filename, callback, dirStatLimit) {
/*
* The only external call to this function provides an explicit value for
* dirStatLimit: this check could be removed.
*/
if (typeof dirStatLimit === 'undefined') { if (typeof dirStatLimit === 'undefined') {
dirStatLimit = 3; dirStatLimit = 3;
} }