diff --git a/blocks/product-recommendations/product-recommendations.js b/blocks/product-recommendations/product-recommendations.js index 29172ea649..59464f5688 100644 --- a/blocks/product-recommendations/product-recommendations.js +++ b/blocks/product-recommendations/product-recommendations.js @@ -191,8 +191,8 @@ export default async function decorate(block) { loadRecommendation(block, context); } - function handleCategoryChanges({ eventInfo }) { - context.category = eventInfo.categoryContext.name; + function handleCategoryChanges({ categoryContext }) { + context.category = categoryContext.name; loadRecommendation(block, context); } @@ -201,8 +201,8 @@ export default async function decorate(block) { loadRecommendation(block, context); } - function handleCartChanges({ eventInfo }) { - context.cartSkus = eventInfo.shoppingCartContext.items.map(({ product }) => product.sku); + function handleCartChanges({ shoppingCartContext }) { + context.cartSkus = shoppingCartContext.items.map(({ product }) => product.sku); loadRecommendation(block, context); }