Skip to content

Commit

Permalink
install: fix checking for optional dep
Browse files Browse the repository at this point in the history
  • Loading branch information
larsgw committed Oct 7, 2018
1 parent 03840dc commit c81df49
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/install/is-only-optional.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ function isOptional (node, seen) {
if (seen.has(node) || node.requiredBy.length === 0) {
return false
}
seen = new Set(seen)
seen.add(node)
const swOptional = node.fromShrinkwrap && node.package._optional
return node.requiredBy.every(function (req) {
Expand Down

0 comments on commit c81df49

Please sign in to comment.