mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
fix(core): exclude forward refs from distance calculation #7715
This commit is contained in:
@@ -300,8 +300,10 @@ export class DependenciesScanner {
|
||||
|
||||
const moduleImports = moduleRef.imports;
|
||||
moduleImports.forEach(importedModuleRef => {
|
||||
importedModuleRef.distance = distance;
|
||||
calculateDistance(importedModuleRef, distance + 1);
|
||||
if (importedModuleRef) {
|
||||
importedModuleRef.distance = distance;
|
||||
calculateDistance(importedModuleRef, distance + 1);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user