From 4251be4dcd2757c2c811536b6a0e37af74ed41d0 Mon Sep 17 00:00:00 2001 From: "Carlos A. Cabrera" Date: Wed, 11 Dec 2024 15:17:02 -0600 Subject: [PATCH] updated to use new public API --- blocks/product-details/product-details.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocks/product-details/product-details.js b/blocks/product-details/product-details.js index 4125f0e99..6ae1fa06d 100644 --- a/blocks/product-details/product-details.js +++ b/blocks/product-details/product-details.js @@ -30,7 +30,7 @@ import '../../scripts/initializers/cart.js'; export default async function decorate(block) { // eslint-disable-next-line no-underscore-dangle - const product = events._lastEvent?.['pdp/data']?.payload ?? null; + const product = events.lastPayload('pdp/data') ?? null; const labels = await fetchPlaceholders(); // Layout