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

Use Ember.Copyable.detect #10

Merged

Conversation

mpirio
Copy link
Contributor

@mpirio mpirio commented Oct 31, 2017

In my last merged PR, I used canInvoke to know if value was extending Ember.Copyable. I think it's better to use Ember.Copyable.detect method as in Ember.copy method.

Use `Ember.Copyable.detect` to know if `value` extends Ember.Copyable mixin,
like in https://github.com/emberjs/ember.js/blob/master/packages/ember-runtime/lib/copy.js#L93
@offirgolan
Copy link
Owner

I usually don't like using detect since it is "private" API but I think this is a valid use-case for it. Thanks for this 😄

@offirgolan offirgolan merged commit 288fe3b into offirgolan:master Oct 31, 2017
@mpirio mpirio deleted the improvement/useEmberCopyableDetect branch November 2, 2017 10:17
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