mirror of
https://github.com/nasa/openmct.git
synced 2025-04-26 13:59:50 +00:00
[Persistence] Remove persistence call from compose action
This commit is contained in:
parent
ef815cf060
commit
c99ffcb1f4
@ -41,19 +41,11 @@ define(
|
|||||||
LinkAction.prototype.perform = function () {
|
LinkAction.prototype.perform = function () {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
// Persist changes to the domain object
|
|
||||||
function doPersist() {
|
|
||||||
var persistence =
|
|
||||||
self.domainObject.getCapability('persistence');
|
|
||||||
return persistence.persist();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Link these objects
|
// Link these objects
|
||||||
function doLink() {
|
function doLink() {
|
||||||
var composition = self.domainObject &&
|
var composition = self.domainObject &&
|
||||||
self.domainObject.getCapability('composition');
|
self.domainObject.getCapability('composition');
|
||||||
return composition && composition.add(self.selectedObject)
|
return composition && composition.add(self.selectedObject);
|
||||||
.then(doPersist);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.selectedObject && doLink();
|
return this.selectedObject && doLink();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user