From 466a2eba94484d7558f22119f8d628844e80ef7b Mon Sep 17 00:00:00 2001 From: Jason Mitchell Date: Fri, 25 Aug 2017 19:46:38 -0700 Subject: [PATCH] fix(helper.isArray): replace a.constructor === Array with Array.isArray a.constructor === Array is always falsey when you run showdown within Node's VM API. Related to https://github.com/nodejs/node/issues/7351 Closes #425 --- src/helpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers.js b/src/helpers.js index d0cdae0d..c72be004 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -37,7 +37,7 @@ showdown.helper.isFunction = function (a) { */ showdown.helper.isArray = function (a) { 'use strict'; - return a.constructor === Array; + return Array.isArray(a); }; /**