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 Object.assign error in IE11 #149

Merged
merged 1 commit into from
Jan 12, 2018
Merged

Fix Object.assign error in IE11 #149

merged 1 commit into from
Jan 12, 2018

Conversation

XaserAcheron
Copy link
Contributor

Closes #145

This just does the classic Ember.assign fallback if Object.assign isn't defined (i.e. in IE ;)

Copy link
Member

@marcoow marcoow left a comment

Choose a reason for hiding this comment

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

Thanks! I'll restart the tests - the failure seems like it might be a Travis problem…

const { keys, assign } = Object;
import { merge, assign as emberAssign } from '@ember/polyfills';
const { keys } = Object;
const assign = Object.assign || emberAssign || merge;
Copy link
Member

Choose a reason for hiding this comment

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

I guess emberAssign would always be present so the fallback to || merge is not necessary? We could even just always use emberAssign.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ember.assign was added in Ember 2.5, so the merge fallback is there for older version support. It's a fairly common pattern, I've seen.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, you're right of course 🤦‍♂️

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Heh, no worries -- I do that all the time.

Thanks for the merge! :)

@marcoow marcoow mentioned this pull request Jan 12, 2018
@marcoow
Copy link
Member

marcoow commented Jan 12, 2018

I rebased on master which should fix the breaking build.

@marcoow marcoow merged commit 1385de1 into mainmatter:master Jan 12, 2018
@XaserAcheron XaserAcheron deleted the ie11-assign-fix branch January 12, 2018 15:48
@ncoden ncoden mentioned this pull request Jan 24, 2018
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.

None yet

2 participants