Skip to content

Conversation

@cloke
Copy link

@cloke cloke commented Feb 17, 2018

Properties on promises are computed with ember 3. Use getters rather than raw accessor.

@cloke cloke requested a review from fastfedora February 17, 2018 23:51
(typeof value.content !== 'undefined' ? value.content : undefined) :
value;
return value && typeof value.get('isPending') !== 'undefined' ?
(typeof value.content !== 'undefined' ? value.content : undefined) :
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are all properties computed? If so, shouldn't these also be changed to value.get('content')?

Copy link
Contributor

@fastfedora fastfedora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if this works in Ember 2.x, or is this Ember 3.x only?

@cloke
Copy link
Author

cloke commented Mar 4, 2018

Updated the last getter. I haven't tested on ember two as all my projects are on v3.

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