Skip to content

Commit

Permalink
Update ContentExtension.php
Browse files Browse the repository at this point in the history
  • Loading branch information
bobdenotter authored Oct 5, 2022
1 parent 4ddea80 commit 16f76de
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Twig/ContentExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,10 @@ private function findOneImage(Field $field)

if ($field instanceof ListFieldInterface) {
foreach ($field->getValue() as $subField) {
if ($this->findOneImage($subField)) {
return $subField;
$foundImageField = $this->findOneImage($subField);

if ($foundImageField) {
return $foundImageField;
}
}
}
Expand Down

0 comments on commit 16f76de

Please sign in to comment.