diff --git a/src/showdown.js b/src/showdown.js index b488bad..7a57977 100644 --- a/src/showdown.js +++ b/src/showdown.js @@ -117,8 +117,11 @@ var g_output_modifiers = []; // Automatic Extension Loading (node only): // -if (typeof module !== 'undefind' && typeof exports !== 'undefined' && typeof require !== 'undefind') { - var fs = require('fs'); +if (typeof module !== 'undefined' && typeof exports !== 'undefined' && typeof require !== 'undefined') { + var fs; + try { + fs = require('fs'); + } catch(e) {} if (fs) { // Search extensions folder