We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4753b85 commit 5963d18Copy full SHA for 5963d18
src/Container.ts
@@ -75,7 +75,9 @@ export class Container {
75
76
// if named service was requested and its instance was not found plus there is not type to know what to initialize,
77
// this means service was not pre-registered and we throw an exception
78
- if ((!service || !service.type) && (typeof identifier === "string" || identifier instanceof Token))
+ if ((!service || !service.type) &&
79
+ (!service || !service.factory) &&
80
+ (typeof identifier === "string" || identifier instanceof Token))
81
throw new ServiceNotFoundError(identifier);
82
83
// at this point we either have type in service registered, either identifier is a target type
0 commit comments