fix(upgrade): fix registerForNg1Tests (#13522)

Fix an issue in `registerForNg1Tests`, where it passes a `null` as
`ng1Injector` to `_bootstrapDone`. This causes a "TypeError: Cannot
read property 'get' of null" to be thrown from `_bootstrapDone`.
This commit is contained in:
Janne Vanhala
2016-12-17 01:14:16 +02:00
committed by Chuck Jazdzewski
parent 3f178410c3
commit c26c24c544
3 changed files with 54 additions and 8 deletions

View File

@ -320,7 +320,7 @@ export class UpgradeAdapter {
windowNgMock.module(this.ng1Module.name);
const upgrade = new UpgradeAdapterRef();
this.ng2BootstrapDeferred.promise.then(
() => { (<any>upgrade)._bootstrapDone(this.moduleRef, upgrade.ng1Injector); }, onError);
(ng1Injector) => { (<any>upgrade)._bootstrapDone(this.moduleRef, ng1Injector); }, onError);
return upgrade;
}