Created
April 18, 2011 16:26
-
-
Save ColinCampbell/925654 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/frameworks/datastore/system/record_array.js b/frameworks/datastore/system/record_array.js | |
index 0687e78..2f5a109 100644 | |
--- a/frameworks/datastore/system/record_array.js | |
+++ b/frameworks/datastore/system/record_array.js | |
@@ -300,15 +300,17 @@ SC.RecordArray = SC.Object.extend(SC.Enumerable, SC.Array, | |
Extends the standard SC.Enumerable implementation to return results based | |
on a Query if you pass it in. | |
- @param {SC.Query} query a SC.Query object | |
- @param {Object} target the target object to use | |
+ @param {SC.Query|Function} query a SC.Query object | |
+ @param {Object} target the target object to use | |
@returns {SC.RecordArray} | |
*/ | |
find: function(query, target) { | |
if (query && query.isQuery) { | |
return this.get('store').find(query.queryWithScope(this)); | |
- } else return sc_super(); | |
+ } else { | |
+ return SC.Enumerable.find(query, target); | |
+ } | |
}, | |
/** |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment