fix(core-flows): unsafe access to a variant property (#11588)
**What** - fix unsafe access `manage_inventory` flag if variant doesn't exist for the item --- CLOSES https://github.com/medusajs/medusa/issues/11587
This commit is contained in:
@@ -172,7 +172,7 @@ export const listShippingOptionsForCartWorkflow = createWorkflow(
|
|||||||
|
|
||||||
const itemsAtLocationWithoutAvailableQuantity = cart.items.filter(
|
const itemsAtLocationWithoutAvailableQuantity = cart.items.filter(
|
||||||
(item) => {
|
(item) => {
|
||||||
if (!item.variant.manage_inventory) {
|
if (!item.variant?.manage_inventory) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user