diff --git a/extension/tasks/dependabotV1/utils/parseConfigFile.ts b/extension/tasks/dependabotV1/utils/parseConfigFile.ts index 356aa7f5..4b394949 100644 --- a/extension/tasks/dependabotV1/utils/parseConfigFile.ts +++ b/extension/tasks/dependabotV1/utils/parseConfigFile.ts @@ -305,7 +305,7 @@ function parseRegistries(config: any): Record { function validateConfiguration(updates: IDependabotUpdate[], registries: Record) { const configured = Object.keys(registries); const referenced: string[] = []; - for (const u of updates) referenced.push(...u.registries); + for (const u of updates) referenced.push(...(u.registries ?? [])); // ensure there are no configured registries that have not been referenced const missingConfiguration = referenced.filter((el) => !configured.includes(el)); diff --git a/extension/tasks/dependabotV2/utils/dependabot/parseConfigFile.ts b/extension/tasks/dependabotV2/utils/dependabot/parseConfigFile.ts index b9ff1517..df6b6d77 100644 --- a/extension/tasks/dependabotV2/utils/dependabot/parseConfigFile.ts +++ b/extension/tasks/dependabotV2/utils/dependabot/parseConfigFile.ts @@ -272,7 +272,7 @@ function parseRegistries(config: any): Record { function validateConfiguration(updates: IDependabotUpdate[], registries: Record) { const configured = Object.keys(registries); const referenced: string[] = []; - for (const u of updates) referenced.push(...u.registries); + for (const u of updates) referenced.push(...(u.registries ?? [])); // ensure there are no configured registries that have not been referenced const missingConfiguration = referenced.filter((el) => !configured.includes(el));