mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-12 14:16:12 +00:00
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:
1 parent
8c9fbbdd2b
commit
315c89d229
1 file changed
+1
-1
@@ -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),
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user