fix(compiler): Fix compiler crash due to isSkipSelf of null (#30075)

PR Closes https://github.com/angular/angular/issues/27125

PR Close #30075
This commit is contained in:
Keen Yee Liau
2019-04-23 17:02:31 -07:00
committed by Andrew Kushnir
parent c61df39323
commit 28fd5ab12b
2 changed files with 35 additions and 3 deletions

View File

@ -933,7 +933,7 @@ export class CompileMetadataResolver {
}
if (token == null) {
hasUnknownDeps = true;
return null !;
return {};
}
return {
@ -949,7 +949,7 @@ export class CompileMetadataResolver {
if (hasUnknownDeps) {
const depsTokens =
dependenciesMetadata.map((dep) => dep ? stringifyType(dep.token) : '?').join(', ');
dependenciesMetadata.map((dep) => dep.token ? stringifyType(dep.token) : '?').join(', ');
const message =
`Can't resolve all parameters for ${stringifyType(typeOrFunc)}: (${depsTokens}).`;
if (throwOnUnknownDeps || this._config.strictInjectionParameters) {