diff --git a/index.js b/index.js index 18b4266..f4b4834 100644 --- a/index.js +++ b/index.js @@ -32,10 +32,8 @@ const staticify = (root, options) => { root = root || directory; vers = vers || {}; - for (let i = 0, len = ignoredDirectories.length; i < len; i++) { - if (directory.includes(ignoredDirectories[i]) && opts.includeAll === false) { - return; - } + if (opts.includeAll === false && ignoredDirectories.some(d => directory.includes(d))) { + return; } const files = fs.readdirSync(directory);