fix NaN for bmi when divide-by-zero

This commit is contained in:
2025-09-08 01:02:42 +03:00
parent f01829de96
commit 57a998d215
2 changed files with 10 additions and 4 deletions

View File

@@ -84,7 +84,7 @@ const cards = ({
},
{
title: 'dashboard:bmi',
description: bmiFromMetric(weight || 0, height || 0).toString(),
description: bmiFromMetric(weight || 0, height || 0)?.toString() ?? '-',
icon: <TrendingUp />,
iconBg: getBmiBackgroundColor(bmiStatus),
},