Skip to content

Commit 466a2eb

Browse files
jasonmittivie
authored andcommitted
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 nodejs/node#7351 Closes #425
1 parent 48ccbf8 commit 466a2eb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ showdown.helper.isFunction = function (a) {
3737
*/
3838
showdown.helper.isArray = function (a) {
3939
'use strict';
40-
return a.constructor === Array;
40+
return Array.isArray(a);
4141
};
4242

4343
/**

0 commit comments

Comments
 (0)