diff --git a/Client/src/Pages/Infrastructure/Details/index.jsx b/Client/src/Pages/Infrastructure/Details/index.jsx index ccff1388d..3899ad9d2 100644 --- a/Client/src/Pages/Infrastructure/Details/index.jsx +++ b/Client/src/Pages/Infrastructure/Details/index.jsx @@ -215,8 +215,10 @@ const InfrastructureDetails = () => { const logicalCores = latestCheck?.cpu?.logical_core ?? 0; const cpuFrequency = latestCheck?.cpu?.frequency ?? 0; const cpuTemperature = - latestCheck?.cpu?.temperature?.reduce((acc, curr) => acc + curr, 0) / - latestCheck?.cpu?.temperature?.length ?? 0; + latestCheck?.cpu?.temperature?.length > 0 + ? latestCheck.cpu.temperature.reduce((acc, curr) => acc + curr, 0) / + latestCheck.cpu.temperature.length + : 0; const memoryTotalBytes = latestCheck?.memory?.total_bytes ?? 0; const diskTotalBytes = latestCheck?.disk[0]?.total_bytes ?? 0; const os = latestCheck?.host?.os ?? null;