Skip to content

Commit

Permalink
fix: cards block failing with icons in text
Browse files Browse the repository at this point in the history
  • Loading branch information
buuhuu committed Apr 19, 2024
1 parent 4e56e89 commit 5508494
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 @@ -14,7 +14,7 @@ export default function decorate(block) {
});
ul.append(li);
});
ul.querySelectorAll('img').forEach((img) => {
ul.querySelectorAll('picture > img').forEach((img) => {
const optimizedPic = createOptimizedPicture(img.src, img.alt, false, [{ width: '750' }]);
moveInstrumentation(img, optimizedPic.querySelector('img'));
img.closest('picture').replaceWith(optimizedPic);
Expand Down

0 comments on commit 5508494

Please sign in to comment.