Browse files

updates

  • Loading branch information...
1 parent 4259721 commit c8e925b941424c4db8ad93ece05a7277fdfa482c @jergason committed Feb 1, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 ember-data.js
View
3 ember-data.js
@@ -6481,14 +6481,15 @@ DS.JSONSerializer = DS.Serializer.extend({
},
sideloadRelationships: function(loader, type, json, prop, loaded) {
+ if (loaded[prop]) { return; }
loaded[prop] = true;
get(type, 'relationshipsByName').forEach(function(key, meta) {
key = meta.key || key;
if (meta.kind === 'belongsTo') {
key = this.pluralize(key);
}
- if (json[key] && !loaded[key]) {
+ if (json[key]) {
this.sideloadRelationships(loader, meta.type, json, key, loaded);
}
}, this);

0 comments on commit c8e925b

Please sign in to comment.