New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE8 error #226

Merged
merged 1 commit into from Jan 23, 2013

Conversation

Projects
None yet
1 participant
@daffl
Contributor

daffl commented Jan 23, 2013

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.

@daffl

This comment has been minimized.

Show comment
Hide comment
@daffl

daffl Jan 8, 2013

Contributor

Looks like a good fix to me. Could you provide a small test case that breaks in IE so that we can add it to our unit tests?

Or, even better and which would get you in our list of heroes in no time, a pull request with the breaking test and the fix?

Contributor

daffl commented Jan 8, 2013

Looks like a good fix to me. Could you provide a small test case that breaks in IE so that we can add it to our unit tests?

Or, even better and which would get you in our list of heroes in no time, a pull request with the breaking test and the fix?

@ghost ghost assigned daffl Jan 10, 2013

@daffl

This comment has been minimized.

Show comment
Hide comment
@daffl

daffl Jan 23, 2013

Contributor

Allright I added the tests, pull request attached. Thanks again for reporting this!

Contributor

daffl commented Jan 23, 2013

Allright I added the tests, pull request attached. Thanks again for reporting this!

daffl added a commit that referenced this pull request Jan 23, 2013

@daffl daffl merged commit 06163f6 into master Jan 23, 2013

1 check passed

default The Travis build passed
Details

@daffl daffl deleted the ie8-list-setup-226 branch Feb 6, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment