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
This commit is contained in:
Jason Mitchell 2017-08-25 19:46:38 -07:00 committed by Estevão Soares dos Santos
parent 48ccbf848d
commit 466a2eba94

View File

@ -37,7 +37,7 @@ showdown.helper.isFunction = function (a) {
*/
showdown.helper.isArray = function (a) {
'use strict';
return a.constructor === Array;
return Array.isArray(a);
};
/**