fix(targets): classify a weight with the height its band was built from

The child-band change left the classification dividing by the record's
height where it had checked the adult-band height, which the type checker
refused. Both now read the same value.
This commit is contained in:
Marc-André Bombeck committed 2026-11-12 13:03:51 +01:00
1 parent 8c9fbbdd2b
commit 315c89d229
1 file changed
+1 -1
+1 -1
View File
@@ -194,7 +194,7 @@ export function buildVitalTargets({
weightTargetOverride ?? (whoHeightCm ? getWeightRange(whoHeightCm) : null);
let weightClassification: TargetItem["classification"] = null;
if (latestByType.WEIGHT != null && whoHeightCm) {
const heightM = heightCm / 100;
const heightM = whoHeightCm / 100;
const classification = classifyBMI(
latestByType.WEIGHT / (heightM * heightM),
);