From 54ca560f982302623867fc7ec3882e58e6f0d07d Mon Sep 17 00:00:00 2001 From: Pawel Fras Date: Fri, 13 Dec 2024 11:49:51 +0100 Subject: [PATCH] fix: Build issues - fix building libs and CSR by solvig type errors provided with TS 5.6 --- core-libs/setup/ssr/optimized-engine/rendering-cache.ts | 5 ++++- .../asm-customer-360-customer-coupon.component.html | 2 +- .../customer-ticketing-reopen-dialog.component.ts | 9 ++++----- projects/schematics/src/add-ssr/index.ts | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/core-libs/setup/ssr/optimized-engine/rendering-cache.ts b/core-libs/setup/ssr/optimized-engine/rendering-cache.ts index f7700687fb7..87d4b57e6a0 100644 --- a/core-libs/setup/ssr/optimized-engine/rendering-cache.ts +++ b/core-libs/setup/ssr/optimized-engine/rendering-cache.ts @@ -28,7 +28,10 @@ export class RenderingCache { if (this.options?.cacheSize) { this.renders.delete(key); if (this.renders.size >= this.options.cacheSize) { - this.renders.delete(this.renders.keys().next().value); + const oldestKey = this.renders.keys().next().value; + if (oldestKey !== undefined) { + this.renders.delete(oldestKey); + } } } // cache only if shouldCacheRenderingResult return true diff --git a/feature-libs/asm/customer-360/components/sections/asm-customer-360-customer-coupon/asm-customer-360-customer-coupon.component.html b/feature-libs/asm/customer-360/components/sections/asm-customer-360-customer-coupon/asm-customer-360-customer-coupon.component.html index 69d5230a641..878cdf9dd51 100644 --- a/feature-libs/asm/customer-360/components/sections/asm-customer-360-customer-coupon/asm-customer-360-customer-coupon.component.html +++ b/feature-libs/asm/customer-360/components/sections/asm-customer-360-customer-coupon/asm-customer-360-customer-coupon.component.html @@ -56,7 +56,7 @@ [type]="iconTypes.CLOSE" role="button" title="{{ 'common.close' | cxTranslate }}" - (click)="this.searchBox.value = ''" + (click)="searchBox.value = ''" > 0 ?? false; + const mustWaitForAttachment = this.form.get('file')?.value?.length > 0; this.isDataLoading$.next(true); this.subscription = this.customerTicketingFacade .createTicketEvent(this.prepareTicketEvent(), mustWaitForAttachment) diff --git a/projects/schematics/src/add-ssr/index.ts b/projects/schematics/src/add-ssr/index.ts index 20204e49d20..2d460cec4d1 100644 --- a/projects/schematics/src/add-ssr/index.ts +++ b/projects/schematics/src/add-ssr/index.ts @@ -66,7 +66,7 @@ declare module '@schematics/angular/utility/workspace-models' { /** * Since ng17 it's no more "browserTarget" but "buildTarget" property */ - buildTarget?: string; + buildTarget: string; } }