Skip to content

Commit

Permalink
Mark the root as seen, so we don't recurse into it.
Browse files Browse the repository at this point in the history
Fixes npm#1838.
  • Loading branch information
mfncooper committed Feb 4, 2012
1 parent 81ee7cb commit baed6ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ls.js
Expand Up @@ -45,7 +45,7 @@ function bfsify (root, current, queue, seen) {
// which looks nicer
current = current || root
queue = queue || []
seen = seen || []
seen = seen || [root]
var deps = current.dependencies = current.dependencies || {}
Object.keys(deps).forEach(function (d) {
var dep = deps[d]
Expand Down

0 comments on commit baed6ef

Please sign in to comment.