@furystack/inject
Advanced tools
Comparing version 4.0.4 to 4.0.5
@@ -68,3 +68,3 @@ "use strict"; | ||
} | ||
if (meta.options.lifetime !== 'transient' && this.cachedSingletons.has(ctor)) { | ||
if (this.cachedSingletons.has(ctor)) { | ||
return this.cachedSingletons.get(ctor); | ||
@@ -78,3 +78,5 @@ } | ||
const newInstance = new ctor(...deps); | ||
this.setExplicitInstance(newInstance); | ||
if (meta.options.lifetime !== 'transient') { | ||
this.setExplicitInstance(newInstance); | ||
} | ||
return newInstance; | ||
@@ -81,0 +83,0 @@ } |
{ | ||
"name": "@furystack/inject", | ||
"version": "4.0.4", | ||
"version": "4.0.5", | ||
"description": "Core FuryStack package", | ||
@@ -48,3 +48,3 @@ "main": "dist/index.js", | ||
"typings": "./dist/index.d.ts", | ||
"gitHead": "a814d5fa0b27ae9772aa2121f13128cfe1bc2411" | ||
"gitHead": "796eab2ff03a2521e015ca28c341421f7f6d0aa7" | ||
} |
@@ -91,3 +91,3 @@ import { Disposable } from '@furystack/utils' | ||
if (meta.options.lifetime !== 'transient' && this.cachedSingletons.has(ctor)) { | ||
if (this.cachedSingletons.has(ctor)) { | ||
return this.cachedSingletons.get(ctor) as T | ||
@@ -102,3 +102,5 @@ } | ||
const newInstance = new ctor(...deps) | ||
this.setExplicitInstance(newInstance) | ||
if (meta.options.lifetime !== 'transient') { | ||
this.setExplicitInstance(newInstance) | ||
} | ||
return newInstance | ||
@@ -105,0 +107,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
43963
400