fix(medusa): CartService lost shipping address when using the id

This commit is contained in:
adrien2p
2022-05-05 15:07:00 +02:00
parent 2260c2d09e
commit c442be47d4

View File

@@ -412,7 +412,7 @@ class CartService extends BaseService {
}
if (!data.shipping_address) {
if (region.countries.length === 1) {
if (!rawCart.shipping_address && region.countries.length === 1) {
// Preselect the country if the region only has 1
// and create address entity
rawCart.shipping_address = addressRepo.create({