Skip to content

Commit

Permalink
OPENEUROPA-2431: Simplify logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
nagyad committed Oct 25, 2019
1 parent b6c6ba9 commit 8dcc6c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions oe_theme.theme
Original file line number Diff line number Diff line change
Expand Up @@ -937,9 +937,7 @@ function oe_theme_preprocess_pattern_date_block__preview(array &$variables): voi
* Implements hook_preprocess_HOOK().
*/
function oe_theme_preprocess_pattern_text_featured_media__preview(array &$variables): void {
if (is_array($variables['image'])) {
$variables['image'] = ImageValueObject::fromArray($variables['image']);
}
$variables['image'] = ImageValueObject::fromArray($variables['image']);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</div>
{% endif %}
{% if text %}
<div class="ecl-col-12{{ (image is empty) ? '' : ' ecl-col-md-6' }} ecl-editor">{{ text }}</div>
<div class="ecl-col-12{{ image is not empty ? ' ecl-col-md-6' }} ecl-editor">{{ text }}</div>
{% endif %}
</div>
{% endif %}

0 comments on commit 8dcc6c8

Please sign in to comment.