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 () {
|
||||
var self = this;
|
||||
|
||||
// Persist changes to the domain object
|
||||
function doPersist() {
|
||||
var persistence =
|
||||
self.domainObject.getCapability('persistence');
|
||||
return persistence.persist();
|
||||
}
|
||||
|
||||
// Link these objects
|
||||
function doLink() {
|
||||
var composition = self.domainObject &&
|
||||
self.domainObject.getCapability('composition');
|
||||
return composition && composition.add(self.selectedObject)
|
||||
.then(doPersist);
|
||||
return composition && composition.add(self.selectedObject);
|
||||
}
|
||||
|
||||
return this.selectedObject && doLink();
|
||||
|
Loading…
x
Reference in New Issue
Block a user