From 7002697f69b989b5ae9ede5178c01572d66bc354 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Fri, 12 Jun 2026 18:35:07 +0300 Subject: [PATCH] fix(iot-hub): append /preview suffix on card image URL when missing --- .../home/components/iot-hub/iot-hub-item-card.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-item-card.component.ts b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-item-card.component.ts index bdf50acddf..2d9c13d8d7 100644 --- a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-item-card.component.ts +++ b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-item-card.component.ts @@ -62,8 +62,8 @@ export class TbIotHubItemCardComponent { return null; } const [path, query] = this.item.image.split('?'); - const original = path.endsWith('/preview') ? path.slice(0, -'/preview'.length) : path; - const resolved = query ? `${original}?${query}` : original; + const withPreview = path.endsWith('/preview') ? path : `${path}/preview`; + const resolved = query ? `${withPreview}?${query}` : withPreview; return this.iotHubApiService.resolveResourceUrl(resolved); }