From 5916f3114317874b066731b48c93d181703566e7 Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Mon, 25 Nov 2024 13:56:30 +0200 Subject: [PATCH] UI: Refactoring calc row in DashboardWidget --- .../src/app/modules/home/models/dashboard-component.models.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui-ngx/src/app/modules/home/models/dashboard-component.models.ts b/ui-ngx/src/app/modules/home/models/dashboard-component.models.ts index 1f8c4c91f7..6658f0b8a4 100644 --- a/ui-ngx/src/app/modules/home/models/dashboard-component.models.ts +++ b/ui-ngx/src/app/modules/home/models/dashboard-component.models.ts @@ -761,8 +761,7 @@ export class DashboardWidget implements GridsterItem, IDashboardWidget { } else { res = this.sizeY; } - res = Math.floor(res); - return res === 0 ? 1 : res; + return Math.max(Math.floor(res), 1); } set rows(rows: number) {