Skip to content

Commit

Permalink
Add Array.isArray polyfill for old IE
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Wendelin committed Nov 17, 2014
1 parent aed052d commit ac12835
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/spec-helper.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
// Polyfill for old browsers
// See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray
if (!Array.isArray) {
Array.isArray = function(arg) {
return Object.prototype.toString.call(arg) === '[object Array]';
};
}

beforeEach(function() {
this.addMatchers({
toMatchStackFrame: function(expected) {
Expand Down

0 comments on commit ac12835

Please sign in to comment.