-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
Description
Ember.Array methods that return an array, like filterBy, return a bare JS Array rather than an Ember.Array. This makes chaining Ember.Array methods impossible with prototype extensions disabled. Here's an example:
// prototype extensions on
Ember.A(someArray).filterBy(‘property’).mapBy('otherProperty') // => [1, 2, 3]
// prototype extensions off
Ember.A(someArray).filterBy('property').mapBy('otherProperty') // => undefined is not a function
Ember.A(Ember.A(someArray).filterBy('property')).mapBy('otherProperty') // => [1, 2, 3]I can't find any discussion of this in the documentation, so I'm opening an issue. It seems like it would make sense for Ember.Array methods that return an array to return an Ember.Array, so that chaining Ember.Array methods becomes possible.
eagle-dan1349