fix: correct height extraction logic to convert centimeters to meters
All checks were successful
Build Docker Image / build (push) Successful in 1m11s
All checks were successful
Build Docker Image / build (push) Successful in 1m11s
This commit is contained in:
@@ -622,7 +622,8 @@ function extractHeight($: cheerio.CheerioAPI): number | null {
|
||||
const normalized = cleanText.toLowerCase().replace(/\s/g, '');
|
||||
if (normalized.includes('cm')) {
|
||||
const digitsOnly = normalized.replace(/\D/g, '');
|
||||
return parseFloat(digitsOnly) || null;
|
||||
const cm = parseFloat(digitsOnly);
|
||||
return cm ? cm / 100 : null;
|
||||
}
|
||||
|
||||
if (normalized.includes('m')) {
|
||||
|
||||
Reference in New Issue
Block a user