-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[BUGFIX beta] Make computed.or return more like || #10259
Conversation
/cc @stefanpenner |
hmm, I would like someone elses input on this @wycats r? |
5f15b9c
to
55fdf78
Compare
Alternately |
I'd like to resolve this one way or another - I think it's relatively important given the deprecation of What are the objections or discussion points around this? |
@soulcutter can you rebase this, we can get it in for 2.0. Please rename it to |
Sure - when you say rename it, do you mean to prefix the commit message with that, or replace it completely with that? I assume "it" is the commit message |
^^ |
55fdf78
to
31c99c4
Compare
Done. |
yay! |
@soulcutter - I'm sorry I missed your last comment. Looks like this needs another rebase. |
Given the recent deprecation of computed.any in favor of computed.or it seems more-appropriate to return the last falsy value to enable these computed properties to potentially be rendered directly in templates without the need to be wrapped in {{#if}} blocks. The behavior of computed.any was to return null, so this brings computed.or more inline with replacing computed.any
31c99c4
to
ad8e3f2
Compare
Ok I rebased again. Fourth time is a charm? I hope this time is the last… |
[BUGFIX beta] Make computed.or return more like ||
Thank you! |
Given the recent deprecation of computed.any in favor of computed.or it
seems more-appropriate to return the last falsy value to enable
these computed properties to potentially be rendered directly in
templates without the need to be wrapped in {{#if}} blocks.
The behavior of computed.any was to return null, so this brings
computed.or more inline with replacing computed.any
The way javascript
||
works is that it returns the last value, soEdit: update to fix merge conflict, the way computed properties are declared/exported changed slightly