-
-
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] Deprecate Array/Reduce computed #11403
[BUGFIX beta] Deprecate Array/Reduce computed #11403
Conversation
@private | ||
*/ | ||
function arrayComputed(options) { | ||
Ember.deprecate('Ember.arrayComputed is deprecated. Replace it with plain array methods'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are Ember.computed reduce/array macros being removed completely, or will they replaced with plain array method shortcuts? |
f773886
to
31ea060
Compare
@joeruello Precisely #10582 implements those macros (filter, sort) without using arrayComputed/reduceComputed |
An alternative way to accomplish this is to simply export to global ( @cibernox thoughts? It seems simpler than mucking with options. |
@mixonic - We need the deprecation in both |
@@ -12,6 +12,9 @@ var a_slice = [].slice; | |||
function ArrayComputedProperty() { | |||
var cp = this; | |||
|
|||
var options = arguments[arguments.length - 1]; | |||
options._isArrayComputed = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can set on this
instead of grabbing options
here.
Something like:
this._isArrayComputed = true;
ReduceComputedProperty.apply(this, arguments);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much simpler, I'll change that
31ea060
to
1c68d84
Compare
Updated |
What happened to the build here? 0_o |
WAT? TRAVIS Y U NO RUN? |
@cibernox - Can you |
1c68d84
to
30817b7
Compare
Let see if travis is in a more disposed mood now |
Seems that this time sauce is on one in a bad mood sigh |
…e_computed [BUGFIX beta] Deprecate Array/Reduce computed
This PR pairs with #10582