backbone-rel-partialput
Advanced tools
Comparing version 0.12.0 to 0.12.1
@@ -77,8 +77,9 @@ (function(root, factory) { | ||
var result = {}; | ||
var that = this | ||
_.each(inlineJSON, function(key) { | ||
var firstKey = key.split(".")[0]; | ||
if(!_.isEqual(json[firstKey], this._syncedInlinedJSONRepresentation[firstKey])) { | ||
if(!_.isEqual(json[firstKey], that._syncedInlinedJSONRepresentation[firstKey])) { | ||
result[key] = json[firstKey]; | ||
} | ||
}, this); | ||
}); | ||
return result; | ||
@@ -101,9 +102,10 @@ }, | ||
var that = this; | ||
_.each(this.attributes, function(value, key) { | ||
if(this._syncedAttributes[key]) { | ||
if(that._syncedAttributes[key]) { | ||
return; | ||
} | ||
this.unset(key, { silent: true }); | ||
}, this); | ||
that.unset(key, { silent: true }); | ||
}); | ||
@@ -110,0 +112,0 @@ this.trigger('change'); |
@@ -12,3 +12,3 @@ { | ||
"underscore": ">=1.5.0", | ||
"backbone-rel": ">=0.10.5" | ||
"backbone-rel": ">=0.10.10" | ||
}, | ||
@@ -41,3 +41,3 @@ "devDependencies": { | ||
"main": "backbone-partialput.js", | ||
"version": "0.12.0", | ||
"version": "0.12.1", | ||
"license": "MIT", | ||
@@ -44,0 +44,0 @@ "repository": { |
437768
1447
Updatedbackbone-rel@>=0.10.10