From e58736f2168402892ff1d9327446c430fab72d90 Mon Sep 17 00:00:00 2001 From: Alec Perkins Date: Sat, 25 Jan 2014 13:40:02 -0500 Subject: [PATCH] Simplify test for fs.readdirSync. --- src/showdown.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/showdown.js b/src/showdown.js index 40b0996..12ad0fa 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 ((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');