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

Polyfill wrongly throws if one argument is a function #2

Closed
webbedspace opened this issue Jul 19, 2014 · 1 comment
Closed

Polyfill wrongly throws if one argument is a function #2

webbedspace opened this issue Jul 19, 2014 · 1 comment
Assignees

Comments

@webbedspace
Copy link

Theres nothing in the spec that says that functions can't be passed to Object.assign as either source or target (the abstract operation ToObject leaves functions unmodified), but this polyfill throws for either case. :(

It also wrongly throws if passed primitives, when in fact it should call Object() on them and use that result in their place.

@webbedspace webbedspace changed the title Object.assign throws if one argument is a function Polyfill wrongly throws if one argument is a function Jul 19, 2014
@ljharb
Copy link
Owner

ljharb commented Jul 19, 2014

Hmm, that's a good point. Fixing now, thanks!

@ljharb ljharb self-assigned this Jul 19, 2014
ljharb added a commit that referenced this issue Jul 19, 2014
@ljharb ljharb closed this as completed in e881904 Jul 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants