diff --git a/src/showdown.js b/src/showdown.js index b488bad..3ee6c0b 100644 --- a/src/showdown.js +++ b/src/showdown.js @@ -120,7 +120,7 @@ var g_output_modifiers = []; if (typeof module !== 'undefind' && typeof exports !== 'undefined' && typeof require !== 'undefind') { var fs = require('fs'); - if (fs) { + if (fs && typeof fs.readdirSync === 'function') { // Search extensions folder var extensions = fs.readdirSync((__dirname || '.')+'/extensions').filter(function(file){ return ~file.indexOf('.js');