Skip to content

Commit

Permalink
Merge pull request #6346 from Connormiha/simplife-has-dependencies
Browse files Browse the repository at this point in the history
Simplify check hasDependencies and add unit tests
  • Loading branch information
sokra committed Jun 28, 2018
2 parents dcf3e09 + dddb547 commit b848ec5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/DependenciesBlockVariable.js
Expand Up @@ -41,11 +41,9 @@ class DependenciesBlockVariable {

hasDependencies(filter) {
if (filter) {
if (this.dependencies.some(filter)) return true;
} else {
if (this.dependencies.length > 0) return true;
return this.dependencies.some(filter);
}
return false;
return this.dependencies.length > 0;
}
}

Expand Down

0 comments on commit b848ec5

Please sign in to comment.