fix(medusa): allow address updates on carts w/o existing address (#2176)

This commit is contained in:
Sebastian Rindom
2022-09-13 07:51:08 +00:00
committed by GitHub
parent 70cf3f1f2c
commit 37fd48000b
2 changed files with 8 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@medusajs/medusa": patch
---
fix(medusa): allow address updates on carts w/o existing address
+3 -2
View File
@@ -1937,12 +1937,13 @@ class CartService extends TransactionBaseService {
)
}
const updated = {
const updated = addrRepo.create({
...shippingAddress,
country_code: countryCode.toLowerCase(),
}
})
await addrRepo.save(updated)
await this.updateShippingAddress_(cart, updated, addrRepo)
} else {
/*
* In the case where the country code is not specified we need to check