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

refactor(make-svg): replace ember-copy with assign #92

Merged
merged 1 commit into from
Aug 29, 2018

Conversation

buschtoens
Copy link
Contributor

AFAICT asset.attrs is a shallow object and does not implement the Copyable interface or the copy method. Calling the copy function from ember-copy on it therefore only creates a shallow copy.

This is exactly what assign does, when you assign into an empty object.

Referencing #77.

AFAICT `asset.attrs` is a shallow object and does not implement the [`Copyable` interface][1]
or the `copy` method. Calling the `copy` function from ember-copy on it therefore only
creates a shallow copy.

This is exactly what [`assign`][2] does, when you assign into an empty object.

Referencing evoactivity#77.

[1]: https://www.emberjs.com/api/ember/release/classes/Ember.Copyable
[2]: https://emberjs.com/api/api/ember/release/functions/@ember%2Fpolyfills/assign
@snewcomer
Copy link

Would love to see this one in there! I have been seeing deprecations on Ember.Copyable in > 3.3.

@voltidev
Copy link
Collaborator

Unfortunately, it breaks compatibility with older Ember versions. Ember.assign is not available in <= 2.4. I'll try https://github.com/shipshapecode/ember-assign-polyfill

@voltidev voltidev merged commit 94970c9 into evoactivity:master Aug 29, 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.

3 participants