Skip to content

Commit

Permalink
Merge pull request #354 from buuhuu/fix-cards-text-with-icon
Browse files Browse the repository at this point in the history
fix: cards fail if the text contains an icon
  • Loading branch information
fkakatie authored Jul 30, 2024
2 parents 8676c36 + 08a03db commit 555e045
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blocks/cards/cards.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function decorate(block) {
});
ul.append(li);
});
ul.querySelectorAll('img').forEach((img) => img.closest('picture').replaceWith(createOptimizedPicture(img.src, img.alt, false, [{ width: '750' }])));
ul.querySelectorAll('picture > img').forEach((img) => img.closest('picture').replaceWith(createOptimizedPicture(img.src, img.alt, false, [{ width: '750' }])));
block.textContent = '';
block.append(ul);
}

0 comments on commit 555e045

Please sign in to comment.