bitovi/canjs — pull request #226 by daffl (2013-01-23 06:17:53+00:00)
Title: IE8 error

observe.js line 422 throws this error in IE9 (IE8 mode). I haven't had a chance to test it in the real IE8.

> SCRIPT5028: Function.prototype.apply: Array or arguments object expected

I changed the line from this:

this.push.apply(this, instances || []);

to this:

this.push.apply(this, can.makeArray(instances || []));

and now it works fine. instances was an observable list so even though it had items (indexable items) IE doesn't recognize it as an array.