summaryrefslogtreecommitdiff
path: root/dev/util.js
diff options
context:
space:
mode:
Diffstat (limited to 'dev/util.js')
-rw-r--r--dev/util.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/dev/util.js b/dev/util.js
index 89bd95da..eee16964 100644
--- a/dev/util.js
+++ b/dev/util.js
@@ -40,10 +40,8 @@ export function getAllFiles(baseDirectory, predicate = null) {
if (typeof predicate !== 'function' || predicate(relativeFileName, false)) {
results.push(relativeFileName);
}
- } else if (stats.isDirectory()) {
- if (typeof predicate !== 'function' || predicate(relativeFileName, true)) {
- directories.push(fullFileName);
- }
+ } else if (stats.isDirectory() && (typeof predicate !== 'function' || predicate(relativeFileName, true))) {
+ directories.push(fullFileName);
}
}
}