mirror of
https://github.com/nasa/openmct.git
synced 2024-12-24 15:26:39 +00:00
[Compatibility] Store reference instead of binding
This commit is contained in:
parent
b0a23590d4
commit
058a0d393d
@ -14,16 +14,17 @@ define(
|
|||||||
* primary location. Returns a promise.
|
* primary location. Returns a promise.
|
||||||
*/
|
*/
|
||||||
LocationCapability.prototype.persistLocation = function () {
|
LocationCapability.prototype.persistLocation = function () {
|
||||||
|
var capability = this;
|
||||||
return this.domainObject.useCapability(
|
return this.domainObject.useCapability(
|
||||||
'mutation',
|
'mutation',
|
||||||
function (model) {
|
function (model) {
|
||||||
model.location = this.getLocation();
|
model.location = capability.getLocation();
|
||||||
}.bind(this)
|
}
|
||||||
).then(function () {
|
).then(function () {
|
||||||
return this.domainObject
|
return capability.domainObject
|
||||||
.getCapability('persistence')
|
.getCapability('persistence')
|
||||||
.persist();
|
.persist();
|
||||||
}.bind(this));
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user