Simplify test for fs.readdirSync.

This commit is contained in:
Alec Perkins 2014-01-25 13:40:02 -05:00
parent 35c2826a6e
commit e58736f216

View File

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