hotfix: don't allow empty carts to be created
This commit is contained in:
@@ -308,7 +308,7 @@ class OrderService extends BaseService {
|
|||||||
|
|
||||||
// Would be the case if a discount code is applied that covers the item
|
// Would be the case if a discount code is applied that covers the item
|
||||||
// total
|
// total
|
||||||
if (total !== 0) {
|
if (total !== 0 && cart.items.length > 0) {
|
||||||
// Throw if payment method does not exist
|
// Throw if payment method does not exist
|
||||||
if (!payment_method) {
|
if (!payment_method) {
|
||||||
throw new MedusaError(
|
throw new MedusaError(
|
||||||
|
|||||||
Reference in New Issue
Block a user