Comparing version 2.0.1 to 2.0.2
{ | ||
"name": "true-di", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Simple Dependency Injection solution for TypeScript and Javascript", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -12,2 +12,4 @@ import UniqueStack from './unique-stack'; | ||
) => <N extends keyof C>(container: C, name: N): C[N] => { | ||
if (instances.has(name)) return instances.get(name); | ||
if (stack.push(name)[0] != null) { | ||
@@ -14,0 +16,0 @@ throw new Error('Cyclic dependencies couldn\'t be resolved.'); |
@@ -40,5 +40,3 @@ import createInstanceFactory from './create-instance'; | ||
enumerable: Object.getOwnPropertyDescriptor(factories, name).enumerable, | ||
get: () => ( | ||
instances.has(name) ? instances.get(name) : createInstance(container, name) | ||
), | ||
get: () => createInstance(container, name), | ||
set: (value: null | undefined) => { | ||
@@ -45,0 +43,0 @@ if (value != null) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50309
1062