Skip to content

Commit

Permalink
mini compare minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohit Sahu committed Jul 16, 2024
1 parent 85df472 commit a1d8f9e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libs/blocks/merch-card/merch-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,11 @@ const parseContent = async (el, merchCard) => {
if (merchCard.variant === MINI_COMPARE_CHART) {
bodySlotName = 'body-m';
const priceSmallType = el.querySelectorAll('h6');
appendSlot(priceSmallType, 'price-commitment', merchCard);
// Filter out any h6 elements that contain an <em> tag
const filteredPriceSmallType = Array.from(priceSmallType).filter(h6 => !h6.querySelector('em'));
if (filteredPriceSmallType.length > 0) {
appendSlot(filteredPriceSmallType, 'price-commitment', merchCard);
}
}

let headingSize = 3;
Expand Down

0 comments on commit a1d8f9e

Please sign in to comment.