Skip to content

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.

2 participants