[Copy] #497 Removed extraenuous persist call

This commit is contained in:
Henry 2016-01-21 18:51:33 -08:00 committed by Pete Richards
parent 45276183b9
commit b8b5fdcabf

View File

@ -101,9 +101,8 @@ define(
* Will add a list of clones to the specified parent's composition * Will add a list of clones to the specified parent's composition
*/ */
function addClonesToParent(self) { function addClonesToParent(self) {
return self.firstClone.getCapability("persistence").persist() self.parent.getCapability("composition").add(self.firstClone.getId());
.then(function(){self.parent.getCapability("composition").add(self.firstClone.getId());}) return self.parent.getCapability("persistence").persist()
.then(function(){return self.parent.getCapability("persistence").persist();})
.then(function(){return self.firstClone;}); .then(function(){return self.firstClone;});
} }