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

This commit is contained in:
Sebastian Rindom authored and GitHub committed 2022-09-13 07:51:08 +00:00
1 parent 70cf3f1f2c
commit 37fd48000b
2 files changed
+8 -2

No files matched your search

+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