@@ -495,17 +495,15 @@ function getDependencyList(depMap, depLookup) {
495
495
var depPaths = o.depPaths ? o.depPaths : [spec];
496
496
497
497
// Only add a dependency once
498
- if(lookup[spec] == undefined) {
498
+ // We need both the local and global " auditLookup" tables.
499
+ // The global lookup is used to ensure we only audit a
500
+ // dependency once, but cannot be done at the same level
501
+ // as the local lookup since the sub-dependencies are not
502
+ // available at all locations of the dependency tree (depMap).
503
+ if(lookup[spec] == undefined && auditLookup[spec] == undefined) {
499
504
lookup[spec] = true ;
500
- // We need both the local and global " auditLookup" tables.
501
- // The global lookup is used to ensure we only audit a
502
- // dependency once, but cannot be done at the same level
503
- // as the local lookup since the sub-dependencies are not
504
- // available at all locations of the dependency tree (depMap).
505
- if (auditLookup[spec] == undefined) {
506
- auditLookup[spec] = true ;
507
- results.push({" pm" : pm, " name" : name, " version" : version, " depPaths" : depPaths});
508
- }
505
+ auditLookup[spec] = true ;
506
+ results.push({" pm" : pm, " name" : name, " version" : version, " depPaths" : depPaths});
509
507
510
508
// If there is a possibility of recursive dependencies...
511
509
if (o.version) {
0 commit comments