[Compatibility] Store reference instead of binding

This commit is contained in:
Pete Richards 2015-08-06 16:55:15 -07:00
parent b0a23590d4
commit 058a0d393d

View File

@ -14,16 +14,17 @@ define(
* primary location. Returns a promise.
*/
LocationCapability.prototype.persistLocation = function () {
var capability = this;
return this.domainObject.useCapability(
'mutation',
function (model) {
model.location = this.getLocation();
}.bind(this)
model.location = capability.getLocation();
}
).then(function () {
return this.domainObject
return capability.domainObject
.getCapability('persistence')
.persist();
}.bind(this));
});
};
/**