Skip to content
This repository has been archived by the owner on May 2, 2023. It is now read-only.

Commit

Permalink
fix(card): Adding checks on props - FRONT-1138 (#446)
Browse files Browse the repository at this point in the history
  • Loading branch information
planctus authored May 6, 2020
1 parent a6e9e94 commit 2390126
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ec/packages/ec-component-card/ecl-card.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@

<article class="{{ _css_class }}"{{ _extra_attributes|raw }}>
<header class="ecl-card__header">
{% if _card.image.src %}
<div class="ecl-card__image" aria-label="{{ _card.image.alt }}" role="img" style="background-image:url('{{ _card.image.src }}')"></div>
{% if _card.image.src is defined and _card.image.src is not empty %}
{% set _card_img_aria_label = _card.image.alt is defined and _card.image.alt is not empty ? 'aria-label="' ~ _card.image.alt ~ '"' : '' %}
<div class="ecl-card__image" {{ _card_img_aria_label|raw }} role="img" style="background-image:url('{{ _card.image.src }}')"></div>
{% endif %}
{% if _card.meta is not empty %}
<div class="ecl-card__meta">{{ _card.meta|join(" | ") }}</div>
Expand Down

0 comments on commit 2390126

Please sign in to comment.