1
0
Fork 0

chore(core): Syntax change for better test coverage

This commit is contained in:
joostdecock 2022-07-30 15:16:17 +02:00
parent af89117598
commit 698fb7d942

View file

@ -584,9 +584,9 @@ Pattern.prototype.resolveDependencies = function (graph = this.config.dependenci
let dependency = this.config.inject[i] let dependency = this.config.inject[i]
if (typeof this.config.dependencies[i] === 'undefined') this.config.dependencies[i] = dependency if (typeof this.config.dependencies[i] === 'undefined') this.config.dependencies[i] = dependency
else if (this.config.dependencies[i] !== dependency) { else if (this.config.dependencies[i] !== dependency) {
if (typeof this.config.dependencies[i] === 'string') if (typeof this.config.dependencies[i] === 'string') {
this.config.dependencies[i] = [this.config.dependencies[i], dependency] this.config.dependencies[i] = [this.config.dependencies[i], dependency]
else if (Array.isArray(this.config.dependencies[i])) { } else if (Array.isArray(this.config.dependencies[i])) {
if (this.config.dependencies[i].indexOf(dependency) === -1) if (this.config.dependencies[i].indexOf(dependency) === -1)
this.config.dependencies[i].push(dependency) this.config.dependencies[i].push(dependency)
} else { } else {