-
Notifications
You must be signed in to change notification settings - Fork 45
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
Conversation
There was a problem hiding this 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; |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 🤦♂️
There was a problem hiding this comment.
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! :)
I rebased on |
Closes #145
This just does the classic Ember.assign fallback if Object.assign isn't defined (i.e. in IE ;)