Skip to content

Commit ac12835

Browse files
author
Eric Wendelin
committed
Add Array.isArray polyfill for old IE
1 parent aed052d commit ac12835

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

spec/spec-helper.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
// Polyfill for old browsers
2+
// See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray
3+
if (!Array.isArray) {
4+
Array.isArray = function(arg) {
5+
return Object.prototype.toString.call(arg) === '[object Array]';
6+
};
7+
}
8+
19
beforeEach(function() {
210
this.addMatchers({
311
toMatchStackFrame: function(expected) {

0 commit comments

Comments
 (0)