From 81dced7252956e578bdb720c09b3fe31da4bf372 Mon Sep 17 00:00:00 2001 From: Colum Ferry Date: Wed, 26 Jun 2024 10:12:24 +0100 Subject: [PATCH] fix(angular): migration of browserTarget to buildTarget should handle empty config #26681 (#26690) ## Current Behavior The migration from `browserTarget` to `buildTarget` assumed config would not be undefined. ## Expected Behavior The migration should check if config is undefined ## Related Issue(s) Fixes #26681 --- .../migrations/update-17-1-0/browser-target-to-build-target.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular/src/migrations/update-17-1-0/browser-target-to-build-target.ts b/packages/angular/src/migrations/update-17-1-0/browser-target-to-build-target.ts index bee575ace121d..a55094f5815a2 100644 --- a/packages/angular/src/migrations/update-17-1-0/browser-target-to-build-target.ts +++ b/packages/angular/src/migrations/update-17-1-0/browser-target-to-build-target.ts @@ -67,7 +67,7 @@ function updateConfig(config: { browserTarget?: string; buildTarget?: string; }): void { - if (config.browserTarget) { + if (config && config.browserTarget) { config.buildTarget ??= config.browserTarget; delete config.browserTarget; }