async icon indicating copy to clipboard operation
async copied to clipboard

_isArray in ie8

Open mattydoincode opened this issue 12 years ago • 1 comments

The following code is breaking for me in ie8. This is taken directly from the source code line 31:

var _isArray = Array.isArray || function (obj) {
    return toString.call(obj) === '[object Array]'; //toString?
};

//here, calling _isArray([]) breaks;

This breaks various random functions in async for me in ie8. Thoughts?

I've seen other libraries do:

var _toString = Object.prototype.toString;

Array.isArray = Array.isArray || function(obj) {
    return _toString.call(obj) == "[object Array]";
}

mattydoincode avatar Mar 28 '14 19:03 mattydoincode

@mattydoincode I'm happy to accept that patch as a pull request if it fixes IE8 for you

caolan avatar Mar 30 '14 11:03 caolan