Free shipping
This commit is contained in:
@@ -252,10 +252,13 @@ class ShippingOptionService extends BaseService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (price.type === "flat_rate" && (!price.amount || price.amount <= 0)) {
|
if (
|
||||||
|
price.type === "flat_rate" &&
|
||||||
|
(price.amount === undefined || price.amount < 0)
|
||||||
|
) {
|
||||||
throw new MedusaError(
|
throw new MedusaError(
|
||||||
MedusaError.Types.INVALID_DATA,
|
MedusaError.Types.INVALID_DATA,
|
||||||
"Flat rate prices must have be zero or have a postive amount field."
|
"Flat rate prices must be zero or have a postive amount field."
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user