Compare commits

...

2 Commits

Author SHA1 Message Date
Pete Richards
188202afa3 Remove Modern JS to match current style guide 2018-11-06 17:55:07 -08:00
Pete Richards
ea7e94e0fb ensure composition loads in specified order 2018-11-06 17:44:22 -08:00

View File

@@ -177,7 +177,15 @@ define([
CompositionCollection.prototype.load = function () {
return this.provider.load(this.domainObject)
.then(function (children) {
return Promise.all(children.map(this.onProviderAdd, this));
return Promise.all(children.map(function (c) {
return this.publicAPI.objects.get(c);
}, this));
}.bind(this))
.then(function (childObjects) {
childObjects.forEach(function (c) {
this.add(c, true);
}, this);
return childObjects;
}.bind(this))
.then(function (children) {
this.emit('load');