fix(core-flows): support 0 as a valid unit price for custom line items (#11631)

This commit is contained in:
Riqwan Thamir
2025-02-26 19:32:35 +01:00
committed by GitHub
parent d254b2ddba
commit 38beeb157e
3 changed files with 22 additions and 1 deletions
@@ -124,7 +124,7 @@ export const addToCartWorkflow = createWorkflow(
isCustomPrice: isDefined(item?.unit_price),
}
if (variant && !input.unitPrice) {
if (variant && !isDefined(input.unitPrice)) {
input.unitPrice = variant.calculated_price?.calculated_amount
}