Skip to content

Commit

Permalink
fix(core): scoped factories should not fail with optional deps
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Jul 12, 2022
1 parent 976cdf3 commit 1ff1389
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/injector/injector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ export class Injector {
inquirer?: InstanceWrapper,
parentInquirer?: InstanceWrapper,
): Promise<any[]> {
const hosts = await Promise.all(
const hosts: Array<InstanceWrapper<any> | undefined> = await Promise.all(
metadata.map(async item =>
this.resolveScopedComponentHost(
item,
Expand All @@ -791,7 +791,7 @@ export class Injector {
const inquirerId = this.getInquirerId(inquirer);
return hosts.map(
item =>
item.getInstanceByContextId(
item?.getInstanceByContextId(
this.getContextId(contextId, item),
inquirerId,
).instance,
Expand Down

0 comments on commit 1ff1389

Please sign in to comment.