Commit bc348bc3 bc348bc3bd2fa7c3cf1dcebdd997d4dd704909f1 by hexid

Refactor to remove unnecessary entries in paths array

1 parent 824d3fe1
......@@ -189,9 +189,9 @@ CasperError.prototype = Object.getPrototypeOf(new Error());
var extensions = ['js', 'coffee', 'json'];
var basenames = [path, path + '/index'];
var paths = [];
extensions.forEach(function(extension) {
basenames.forEach(function(basename) {
paths.push(fs.pathJoin(dir, basename));
basenames.forEach(function(basename) {
paths.push(fs.pathJoin(dir, basename));
extensions.forEach(function(extension) {
paths.push(fs.pathJoin(dir, [basename, extension].join('.')));
});
});
......