mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
parent
fc01abd708
commit
16cac70aee
|
@ -47,7 +47,15 @@ showdown.helper.isFunction = function (a) {
|
|||
*/
|
||||
showdown.helper.isArray = function (a) {
|
||||
'use strict';
|
||||
return Array.isArray(a);
|
||||
let isArray;
|
||||
if (!Array.isArray) {
|
||||
isArray = function (arg) {
|
||||
return Object.prototype.toString.call(arg) === '[object Array]';
|
||||
};
|
||||
} else {
|
||||
isArray = Array.isArray;
|
||||
}
|
||||
return isArray(a);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user