Update showdown.js

Fixed a couple typos and adding a better check for `fs`. When we are using showdown with webpack, `fs` is returned as an empty object, which passes the test erroneously.
This commit is contained in:
kenese 2014-09-11 14:02:57 +12:00
parent 2e102c72b2
commit d191aa01bd

View File

@ -117,10 +117,10 @@ var g_output_modifiers = [];
// Automatic Extension Loading (node only):
//
if (typeof module !== 'undefind' && typeof exports !== 'undefined' && typeof require !== 'undefind') {
if (typeof module !== 'undefined' && typeof exports !== 'undefined' && typeof require !== 'undefined') {
var fs = require('fs');
if (fs) {
if (fs && fs.readdirSync) {
// Search extensions folder
var extensions = fs.readdirSync((__dirname || '.')+'/extensions').filter(function(file){
return ~file.indexOf('.js');