From 37b4a7e014c7a0224ef38e5799b61d9f90e6b879 Mon Sep 17 00:00:00 2001 From: Darren Ethier Date: Mon, 12 Jun 2023 16:41:27 -0400 Subject: [PATCH] Fix context usage Make sure to consider the context property might not be present --- .../price-v2/inner-blocks/current-price/block.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/atomic/blocks/product-elements/price-v2/inner-blocks/current-price/block.tsx b/assets/js/atomic/blocks/product-elements/price-v2/inner-blocks/current-price/block.tsx index 876382039fa..682803316df 100644 --- a/assets/js/atomic/blocks/product-elements/price-v2/inner-blocks/current-price/block.tsx +++ b/assets/js/atomic/blocks/product-elements/price-v2/inner-blocks/current-price/block.tsx @@ -49,7 +49,7 @@ const Block = ( { style={ style } priceClassName={ priceClassName } currency={ currency } - withSuperScript={ context[ 'woocommerce/withSuperScriptStyle' ] } + withSuperScript={ context?.[ 'woocommerce/withSuperScriptStyle' ] } price={ isDescendentOfSingleProductTemplate ? pricePreview : rawPrice }