fix(ivy): component destroy hook called twice when configured as provider (#28470)
Fixes the `ngOnDestroy` hook on a component or directive being called twice, if the type is also registered as a provider. This PR resolves FW-1010. PR Close #28470
This commit is contained in:

committed by
Igor Minar

parent
0ea216b993
commit
e1aaa7ec48
@ -235,10 +235,6 @@ export class NodeInjectorFactory {
|
||||
* Set to `true` if the token is declared in `viewProviders` (or if it is component).
|
||||
*/
|
||||
isViewProvider: boolean,
|
||||
/**
|
||||
* Set to `true` if the token is a provider, and not a directive.
|
||||
*/
|
||||
public isProvider: boolean,
|
||||
injectImplementation: null|(<T>(token: Type<T>|InjectionToken<T>, flags: InjectFlags) => T)) {
|
||||
this.canSeeViewProviders = isViewProvider;
|
||||
this.injectImpl = injectImplementation;
|
||||
|
Reference in New Issue
Block a user