chore: align local checks

This commit is contained in:
3252a8
2026-06-07 23:57:06 +03:00
parent a86f5d75e1
commit 2077c27252
6 changed files with 6 additions and 10 deletions
+1 -2
View File
@@ -24,8 +24,7 @@ export function devicesCountLabel(devicesData, t, maxDevicesOverride) {
export function devicesPercent(devicesData, maxDevicesOverride) {
const current = Number(devicesData?.current_devices ?? devicesData?.devices?.length ?? 0);
const maxValue =
maxDevicesOverride !== undefined ? maxDevicesOverride : devicesData?.max_devices;
const maxValue = maxDevicesOverride !== undefined ? maxDevicesOverride : devicesData?.max_devices;
if (maxValue === undefined || maxValue === null || maxValue === "") return 0;
const max = Number(maxValue || 0);
if (!max || max <= 0) return 100;