From 94a9985b8b45d50b46e5bf65d149e7aa77721513 Mon Sep 17 00:00:00 2001 From: Pete Bacon Darwin Date: Mon, 22 Mar 2021 16:49:14 +0000 Subject: [PATCH] =?UTF-8?q?refactor(compiler-cli):=20having=20an=20`=C9=B5?= =?UTF-8?q?inj`=20field=20no=20longer=20guarantees=20injectability=20(#412?= =?UTF-8?q?31)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- packages/compiler-cli/src/ngtsc/metadata/src/util.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/compiler-cli/src/ngtsc/metadata/src/util.ts b/packages/compiler-cli/src/ngtsc/metadata/src/util.ts index 8575437127..a27a1b2654 100644 --- a/packages/compiler-cli/src/ngtsc/metadata/src/util.ts +++ b/packages/compiler-cli/src/ngtsc/metadata/src/util.ts @@ -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')); }