@primestyleai/tryon 3.4.1 → 3.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/react/index.js +1 -10
- package/package.json +1 -1
package/dist/react/index.js
CHANGED
|
@@ -450,7 +450,6 @@ function PrimeStyleTryonInner({
|
|
|
450
450
|
const qHeight = heightUnit === "ft" ? ftInToCm(parseFloat(formRef.current.heightFeet || "0"), parseFloat(formRef.current.heightInches || "0")) : parseFloat(formRef.current.height || "0");
|
|
451
451
|
const qWeight = weightUnit === "lbs" ? lbsToKg(parseFloat(formRef.current.weight || "0")) : parseFloat(formRef.current.weight || "0");
|
|
452
452
|
if (!qHeight || qHeight < 100 || !qWeight || qWeight < 30) {
|
|
453
|
-
console.warn("[PrimeStyle] Skipping sizing — invalid height/weight:", { qHeight, qWeight });
|
|
454
453
|
setSizingLoading(false);
|
|
455
454
|
return;
|
|
456
455
|
}
|
|
@@ -470,16 +469,8 @@ function PrimeStyleTryonInner({
|
|
|
470
469
|
const data = await res.json();
|
|
471
470
|
setSizingResult(data);
|
|
472
471
|
} else {
|
|
473
|
-
const errBody = await res.text().catch(() => "");
|
|
474
|
-
console.error("[PrimeStyle] Sizing API error:", res.status, errBody);
|
|
475
|
-
try {
|
|
476
|
-
const parsed = JSON.parse(errBody);
|
|
477
|
-
if (parsed.issues) console.error("[PrimeStyle] Validation issues:", JSON.stringify(parsed.issues, null, 2));
|
|
478
|
-
} catch {
|
|
479
|
-
}
|
|
480
472
|
}
|
|
481
|
-
} catch
|
|
482
|
-
console.warn("[PrimeStyle] Sizing request failed:", err);
|
|
473
|
+
} catch {
|
|
483
474
|
} finally {
|
|
484
475
|
setSizingLoading(false);
|
|
485
476
|
}
|