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

Fix assign polyfill #19692

Merged
merged 1 commit into from
Aug 2, 2021
Merged

Fix assign polyfill #19692

merged 1 commit into from
Aug 2, 2021

Conversation

mydea
Copy link
Contributor

@mydea mydea commented Aug 2, 2021

In #19649 assign was re-written to just pass through to Object.assign. However, the implementation is not ideal - it assigns all the arguments, which includes the target itself. This can lead to problems, e.g. in ember-test-helpers when you have an implementation like this: assign(event, options), it will end up as Object.assign(event, event, options), and complain that we try to set read-only attributes on event.

See: emberjs/ember-test-helpers#1077

Copy link
Member

@rwjblue rwjblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!!!

@stefanpenner
Copy link
Member

:shipit:

@rwjblue rwjblue merged commit b5026b8 into emberjs:master Aug 2, 2021
@mydea mydea deleted the fn/fix-assign branch February 11, 2022 08:02
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

Successfully merging this pull request may close these issues.

3 participants