Skip to content

Commit

Permalink
Fix undefined iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
mburumaxwell committed Sep 23, 2024
1 parent 6b6bc18 commit ed6f0a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion extension/tasks/dependabotV1/utils/parseConfigFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ function parseRegistries(config: any): Record<string, IDependabotRegistry> {
function validateConfiguration(updates: IDependabotUpdate[], registries: Record<string, IDependabotRegistry>) {
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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ function parseRegistries(config: any): Record<string, IDependabotRegistry> {
function validateConfiguration(updates: IDependabotUpdate[], registries: Record<string, IDependabotRegistry>) {
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));
Expand Down

0 comments on commit ed6f0a2

Please sign in to comment.