Stricter fs check

This commit is contained in:
JJ Weber 2014-09-18 23:01:16 -07:00
parent 2e102c72b2
commit e37cacc747

View File

@ -120,7 +120,7 @@ var g_output_modifiers = [];
if (typeof module !== 'undefind' && typeof exports !== 'undefined' && typeof require !== 'undefind') { if (typeof module !== 'undefind' && typeof exports !== 'undefined' && typeof require !== 'undefind') {
var fs = require('fs'); var fs = require('fs');
if (fs) { if (fs && typeof fs.readdirSync === 'function') {
// Search extensions folder // Search extensions folder
var extensions = fs.readdirSync((__dirname || '.')+'/extensions').filter(function(file){ var extensions = fs.readdirSync((__dirname || '.')+'/extensions').filter(function(file){
return ~file.indexOf('.js'); return ~file.indexOf('.js');