mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
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:
parent
48ccbf848d
commit
466a2eba94
|
@ -37,7 +37,7 @@ showdown.helper.isFunction = function (a) {
|
|||
*/
|
||||
showdown.helper.isArray = function (a) {
|
||||
'use strict';
|
||||
return a.constructor === Array;
|
||||
return Array.isArray(a);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user