From 315c89d2297afc134909b394ccbd40f7838fb716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Thu, 12 Nov 2026 13:03:51 +0100 Subject: [PATCH] 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. --- src/lib/targets/vitals-builder.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/targets/vitals-builder.ts b/src/lib/targets/vitals-builder.ts index 9bed9428a..a734adf21 100644 --- a/src/lib/targets/vitals-builder.ts +++ b/src/lib/targets/vitals-builder.ts @@ -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), );