fix(Dart1.8): Promise handling

This commit is contained in:
Victor Berchet
2014-12-01 20:06:21 +01:00
parent 0703ee526c
commit fc2181ec4e
2 changed files with 6 additions and 4 deletions

View File

@ -203,9 +203,10 @@ class _AsyncInjectorStrategy {
var deps = this.injector._resolveDependencies(key, binding, true);
var depsPromise = PromiseWrapper.all(deps);
var promise = PromiseWrapper.then(depsPromise, null, (e) => this._errorHandler(key, e)).
then(deps => this._findOrCreate(key, binding, deps)).
then(instance => this._cacheInstance(key, instance));
var promise = PromiseWrapper
.then(depsPromise, null, (e) => this._errorHandler(key, e))
.then(deps => this._findOrCreate(key, binding, deps))
.then(instance => this._cacheInstance(key, instance));
this.injector._setInstance(key, new _Waiting(promise));
return promise;