[Composition] Return newly-contextualized object
After adding to composition, return the newly-contextualized object; this is regularly used by other services.
This commit is contained in:
@@ -68,10 +68,10 @@ define(
|
||||
}
|
||||
}
|
||||
|
||||
return composition.add(object).then(function () {
|
||||
return parentObject.getCapability('persistence').persist();
|
||||
}).then(function getObjectWithNewContext() {
|
||||
return composition.invoke().then(findChild);
|
||||
return composition.add(object).then(function (result) {
|
||||
return parentObject.getCapability('persistence')
|
||||
.persist()
|
||||
.then(function () { return result; });
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user