File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
packages/core/src/render3/debug Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -207,11 +207,13 @@ function handleInstanceCreatedByInjectorEvent(
207207
208208 // if our value is an instance of a standalone component, map the injector of that standalone
209209 // component to the component class. Otherwise, this event is a noop.
210- let standaloneComponent : Type < unknown > | undefined = undefined ;
210+ let standaloneComponent : Type < unknown > | undefined | null = undefined ;
211211 if ( typeof value === 'object' ) {
212- standaloneComponent = value ?. constructor as Type < unknown > ;
212+ standaloneComponent = value ?. constructor as Type < unknown > | undefined | null ;
213213 }
214- if ( standaloneComponent === undefined || ! isStandaloneComponent ( standaloneComponent ) ) {
214+
215+ // We want to also cover if `standaloneComponent === null` in addition to `undefined`
216+ if ( standaloneComponent == undefined || ! isStandaloneComponent ( standaloneComponent ) ) {
215217 return ;
216218 }
217219
You can’t perform that action at this time.
0 commit comments