fix(medusa): allow address updates on carts w/o existing address (#2176)
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@medusajs/medusa": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix(medusa): allow address updates on carts w/o existing address
|
||||||
@@ -1937,12 +1937,13 @@ class CartService extends TransactionBaseService {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
const updated = {
|
const updated = addrRepo.create({
|
||||||
...shippingAddress,
|
...shippingAddress,
|
||||||
country_code: countryCode.toLowerCase(),
|
country_code: countryCode.toLowerCase(),
|
||||||
}
|
})
|
||||||
|
|
||||||
await addrRepo.save(updated)
|
await addrRepo.save(updated)
|
||||||
|
await this.updateShippingAddress_(cart, updated, addrRepo)
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* In the case where the country code is not specified we need to check
|
* In the case where the country code is not specified we need to check
|
||||||
|
|||||||
Reference in New Issue
Block a user