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()); ...@@ -189,9 +189,9 @@ CasperError.prototype = Object.getPrototypeOf(new Error());
189 var extensions = ['js', 'coffee', 'json']; 189 var extensions = ['js', 'coffee', 'json'];
190 var basenames = [path, path + '/index']; 190 var basenames = [path, path + '/index'];
191 var paths = []; 191 var paths = [];
192 extensions.forEach(function(extension) {
193 basenames.forEach(function(basename) { 192 basenames.forEach(function(basename) {
194 paths.push(fs.pathJoin(dir, basename)); 193 paths.push(fs.pathJoin(dir, basename));
194 extensions.forEach(function(extension) {
195 paths.push(fs.pathJoin(dir, [basename, extension].join('.'))); 195 paths.push(fs.pathJoin(dir, [basename, extension].join('.')));
196 }); 196 });
197 }); 197 });
......