hotfix: don't allow empty carts to be created

This commit is contained in:
Sebastian Rindom
2020-11-05 10:08:06 +01:00
parent db181b1afc
commit f3aba57056

View File

@@ -308,7 +308,7 @@ class OrderService extends BaseService {
// Would be the case if a discount code is applied that covers the item
// total
if (total !== 0) {
if (total !== 0 && cart.items.length > 0) {
// Throw if payment method does not exist
if (!payment_method) {
throw new MedusaError(