Skip to content

Instantly share code, notes, and snippets.

@ColinCampbell
Created April 18, 2011 16:26
Show Gist options
  • Save ColinCampbell/925654 to your computer and use it in GitHub Desktop.
Save ColinCampbell/925654 to your computer and use it in GitHub Desktop.
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