Comparing version 1.5.3 to 1.5.4
{ | ||
"name": "hekdi", | ||
"version": "1.5.3", | ||
"version": "1.5.4", | ||
"description": "Depedency injection framework for node integrated with koa.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -9,3 +9,3 @@ /** | ||
const resolveDependency = function(dependencyName, trace) { | ||
const config = this.getConfigOf(dependencyName); | ||
let config = this.getConfigOf(dependencyName); | ||
if (config === undefined) { | ||
@@ -18,2 +18,6 @@ throw new ReferenceError(errors.unmetDependency(this.belongTo.name, dependencyName)); | ||
trace.push(dependencyName); | ||
while (config.strategy === 'alias') { | ||
trace.push(config.value); | ||
config = this.getConfigOf(config.value); | ||
} | ||
const mayHaveDeps = ['service', 'factory', 'singleton'].includes(config.strategy); | ||
@@ -80,5 +84,4 @@ let d; | ||
alias: dependencyName => function(trace) { | ||
const { value } = this.getConfigOf(dependencyName); | ||
return resolveDependency.call(this, value, trace); | ||
return resolveDependency.call(this, dependencyName, trace); | ||
} | ||
}; |
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
19518
353