Skip to content

Commit

Permalink
fix(core): when the discoverable decorator is not used
Browse files Browse the repository at this point in the history
  • Loading branch information
micalevisk committed Oct 6, 2023
1 parent ecdd86f commit ed92fd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/discovery/discoverable-meta-host-collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ export class DiscoverableMetaHostCollection {
metaKey: string,
): Set<InstanceWrapper> {
const wrappersByMetaKey = this.providersByMetaKey.get(hostContainerRef);
return wrappersByMetaKey.get(metaKey);
return wrappersByMetaKey?.get(metaKey) ?? new Set<InstanceWrapper>();
}

public static getControllersByMetaKey(
hostContainerRef: ModulesContainer,
metaKey: string,
): Set<InstanceWrapper> {
const wrappersByMetaKey = this.controllersByMetaKey.get(hostContainerRef);
return wrappersByMetaKey.get(metaKey);
return wrappersByMetaKey?.get(metaKey) ?? new Set<InstanceWrapper>();
}

private static inspectInstanceWrapper(
Expand Down

0 comments on commit ed92fd3

Please sign in to comment.