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).
pull/3587/head
muxator 2019-03-26 23:58:14 +01:00 committed by muxator
parent cdd4978973
commit c2d8ca212b
1 changed files with 5 additions and 1 deletions

View File

@ -240,7 +240,7 @@ function minify(req, res)
res.end();
}
}
});
}, 3);
}
// 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.
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') {
dirStatLimit = 3;
}