Skip to content

Commit

Permalink
Update columns-small.js
Browse files Browse the repository at this point in the history
  • Loading branch information
RitwikSrivastava authored Sep 21, 2023
1 parent 8a4b178 commit 20209d9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions blocks/columns-small/columns-small.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ export default function decorate(block) {
const pics = col.querySelectorAll('picture');
if (pics.length) {
const picWrapper = pics[0].closest('div');
if (picWrapper && picWrapper.children.length === pics.length) {
// pictures (either wrapped in achors, or otherwise)
// are only content in the column
picWrapper.classList.add('columns-small-img-col');
}
if (picWrapper && picWrapper.children.length === pics.length) {
// pictures (either wrapped in achors, or otherwise)
// are only content in the column
picWrapper.classList.add('columns-small-img-col');
}
}
}
});
Expand Down

0 comments on commit 20209d9

Please sign in to comment.