Skip to content

Commit

Permalink
optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
beyondkmp committed Sep 14, 2024
1 parent 500c90a commit ce78ac6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/node-modules/nodeModuleCollector.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ type Collector struct {
func (t *Collector) readDependencyTree(dependency *Dependency) error {
if t.rootDependency == nil {
t.rootDependency = dependency
} else {
t.allDependencies = append(t.allDependencies, dependency)
}

maxQueueSize := len(dependency.Dependencies) + len(dependency.OptionalDependencies)
Expand Down Expand Up @@ -91,7 +93,6 @@ func (t *Collector) readDependencyTree(dependency *Dependency) error {
return err
}
queue[i].parent = dependency
t.allDependencies = append(t.allDependencies, queue[i])
}
return nil
}
Expand Down

0 comments on commit ce78ac6

Please sign in to comment.