Commit e6ec6ead e6ec6ead5635ef498b4ae4a630a425bdaea03ce2 by Nicolas Perriault

Merge pull request #588 from hexid/refactor-bc

Refactor to remove unnecessary entries in paths array
2 parents 824d3fe1 bc348bc3
......@@ -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));
extensions.forEach(function(extension) {
paths.push(fs.pathJoin(dir, [basename, extension].join('.')));
});
});
......