Skip to content

Commit

Permalink
fix(linter): init should succeed if project has null targets (#15255)
Browse files Browse the repository at this point in the history
  • Loading branch information
AgentEnder committed Feb 27, 2023
1 parent 0a9c200 commit a60bfc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/linter/src/generators/init/init-migration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function migrateConfigToMonorepoStyle(
export function findLintTarget(
project: ProjectConfiguration
): TargetConfiguration {
return Object.entries(project.targets).find(
return Object.entries(project.targets ?? {}).find(
([name, target]) =>
name === 'lint' || target.executor === '@nrwl/linter:eslint'
)?.[1];
Expand Down

0 comments on commit a60bfc2

Please sign in to comment.