mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
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:
parent
cdd4978973
commit
c2d8ca212b
1 changed files with 5 additions and 1 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue