From 7fca6e236a8cc832e19473e64c7de5d9b40f5df6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leosvel=20P=C3=A9rez=20Espinosa?= Date: Tue, 10 Dec 2024 15:12:51 +0100 Subject: [PATCH] fix(angular): normalize prerender and appShell options of the application executor correctly (#29281) ## Current Behavior ## Expected Behavior ## Related Issue(s) Fixes #29276 --- .../application/utils/normalize-options.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/angular/src/executors/application/utils/normalize-options.ts b/packages/angular/src/executors/application/utils/normalize-options.ts index b6e4cb5bc6138..f6b6522c8ac9b 100644 --- a/packages/angular/src/executors/application/utils/normalize-options.ts +++ b/packages/angular/src/executors/application/utils/normalize-options.ts @@ -28,11 +28,12 @@ export function normalizeOptions( } } - return { - ...options, - appShell: angularMajorVersion < 19 ? options.appShell ?? false : undefined, - prerender: - angularMajorVersion < 19 ? options.prerender ?? false : undefined, - security, - }; + let appShell = options.appShell; + let prerender = options.prerender; + if (angularMajorVersion < 19) { + appShell ??= false; + prerender ??= false; + } + + return { ...options, appShell, prerender, security }; }