mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
fix(core): Only update module distance if greater
This commit is contained in:
@@ -365,7 +365,9 @@ export class DependenciesScanner {
|
||||
const moduleImports = moduleRef.imports;
|
||||
moduleImports.forEach(importedModuleRef => {
|
||||
if (importedModuleRef) {
|
||||
importedModuleRef.distance = distance;
|
||||
if (distance > importedModuleRef.distance) {
|
||||
importedModuleRef.distance = distance;
|
||||
}
|
||||
calculateDistance(importedModuleRef, distance + 1);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user