Permalink
Browse files

Applied a fix to the _fetchDataAndLoadRecords method when recordType …

…is null
  • Loading branch information...
1 parent 0304688 commit 7ddb56410b8f87d51c56ecbe0cea789337ae095c @mlcohen mlcohen committed Oct 6, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 frameworks/local/local.js
@@ -113,9 +113,11 @@ SCUDS.LocalDataSource = SC.DataSource.extend({
*/
_fetchDataAndLoadRecords: function(recordTypes, store, query){
var recordType = recordTypes.pop(), that = this;
- var recordTypeString = SC.browser.msie ? recordType._object_className : recordType.toString();
var ds = this._getDataStoreForRecordType(recordType);
+ var recordTypeString;
+ if (recordType) recordTypeString = SC.browser.msie ? recordType._object_className : recordType.toString();
+
if (ds && !this._beenFetched[recordTypeString]) {
var records = ds.getAll();

0 comments on commit 7ddb564

Please sign in to comment.