From c2d8ca212b8be8e57e9a234426720e1d66167d79 Mon Sep 17 00:00:00 2001 From: muxator Date: Tue, 26 Mar 2019 23:58:14 +0100 Subject: [PATCH] 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). --- src/node/utils/Minify.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/node/utils/Minify.js b/src/node/utils/Minify.js index b958ab7cc..d70c835c6 100644 --- a/src/node/utils/Minify.js +++ b/src/node/utils/Minify.js @@ -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; }