Skip to content
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
Merged

IE8 error #226

merged 1 commit into from
Jan 23, 2013

Conversation

daffl
Copy link
Contributor

@daffl 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
Copy link
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
Copy link
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
@daffl daffl deleted the ie8-list-setup-226 branch February 6, 2013 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant