Making sure we only load extension files that end with .js. Otherwise, it creates issues with vim that adds a .js.swp while editing

This commit is contained in:
Xavier Damman 2013-12-10 00:20:00 -08:00
parent bc4089e5c2
commit b460572ccb

View File

@ -123,7 +123,7 @@ if (typeof module !== 'undefind' && typeof exports !== 'undefined' && typeof req
if (fs) {
// Search extensions folder
var extensions = fs.readdirSync((__dirname || '.')+'/extensions').filter(function(file){
return ~file.indexOf('.js');
return file.match(/\.js$/);
}).map(function(file){
return file.replace(/\.js$/, '');
});