-
Notifications
You must be signed in to change notification settings - Fork 286
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 descriptorForDecorator || descriptorForProperty #1002
Use descriptorForDecorator || descriptorForProperty #1002
Conversation
@pzuraq is this the best fix for this? |
We should replace: https://github.com/emberjs/ember-inspector/blob/master/ember_debug/utils/type-check.js#L33 with:
|
@AbhinavVishak do you mind updating the PR to do the changes @pzuraq suggested? |
Sure. Let me try that and see how it behaves. |
dc2ceef
to
b8473d4
Compare
@AbhinavVishak did those changes work well for your use case? |
@rwwagner90, sorry I haven't got a chance to test them out yet. Shall I leave a comment when I do so ?
Check for a normal decorator first, and if not available then check for a property ? |
seems to work as expected. shows the appropriate dependent key for a computed property too. 👍 |
getDescriptorFor() returns undefined for some objects, so wrap with a logical OR to prevent the _dependentKeys accessor from throwing an exception.
b8473d4
to
95aa044
Compare
@pzuraq does the ordering matter? Should we flip them or leave them as is? |
Fixes #999.
getDescriptorFor()
returns undefined for certain properties ( like computed properties through ember-redux, for example), so wrap it with a logical OR to prevent the _dependentKeys accessor from throwing an exception.