refactor(compiler-cli): having an `ɵinj` field no longer guarantees injectability (#41231)

When `ɵngDeclareInjector()` was implemented, the `factory` was moved
out to the `ɵfac` static property on the class. This check was not updated.

PR Close #41231
This commit is contained in:
Pete Bacon Darwin 2021-03-22 16:49:14 +00:00 committed by Alex Rickabaugh
parent 857dfaa1e7
commit 94a9985b8b
1 changed files with 1 additions and 2 deletions

View File

@ -223,6 +223,5 @@ function afterUnderscore(str: string): string {
/** Returns whether a class declaration has the necessary class fields to make it injectable. */
export function hasInjectableFields(clazz: ClassDeclaration, host: ReflectionHost): boolean {
const members = host.getMembersOfClass(clazz);
return members.some(
({isStatic, name}) => isStatic && (name === 'ɵprov' || name === 'ɵfac' || name === 'ɵinj'));
return members.some(({isStatic, name}) => isStatic && (name === 'ɵprov' || name === 'ɵfac'));
}