Skip to content

Commit

Permalink
fix(helper.isArray): replace a.constructor === Array with Array.isArray
Browse files Browse the repository at this point in the history
a.constructor === Array is always falsey when you run showdown within Node's VM API.

Related to nodejs/node#7351

Closes #425
  • Loading branch information
jasonmit authored and tivie committed Aug 26, 2017
1 parent 48ccbf8 commit 466a2eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ showdown.helper.isFunction = function (a) {
*/
showdown.helper.isArray = function (a) {
'use strict';
return a.constructor === Array;
return Array.isArray(a);
};

/**
Expand Down

0 comments on commit 466a2eb

Please sign in to comment.