Skip to content

Commit

Permalink
viewport bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sharath-kannan committed Feb 24, 2025
1 parent b365db2 commit 2d58af6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/utils/decorate.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export async function decorateBlockBg(block, node, { useHandleFocalpoint = false
const allVP = [['mobile-only'], ['tablet-only'], ['desktop-only']];
const viewports = childCount === 2 ? binaryVP : allVP;
[...node.children].forEach((child, i) => {
if (childCount > 1) child.classList.add(...viewports[i]);
if (childCount > 1 && i < viewports.length) child.classList.add(...viewports[i]);
const pic = child.querySelector('picture');
if (useHandleFocalpoint && pic
&& (child.childElementCount === 2 || child.textContent?.trim())) {
Expand Down

0 comments on commit 2d58af6

Please sign in to comment.