Skip to content

Commit

Permalink
Merge pull request #488 from City-of-Helsinki/UHF-7264_fix_empty_tag_…
Browse files Browse the repository at this point in the history
…issue

UHF-7264: Fixed issue with empty tags appearing when the tag was unpu…
  • Loading branch information
teroelonen authored Nov 24, 2022
2 parents 40e38b1 + 1e1ec05 commit 419f78c
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions templates/misc/tag.twig
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{# See available colors from _tags.scss #}

{% if color %}
{% set tag_color_class = 'content-tags__tags__tag--' ~ color %}
{% endif %}

<li class="content-tags__tags__tag {{ tag_color_class }}">
{% if addSpan %}
<span>{{ tag }}</span>
{% else %}
{{ tag }}
{% if tag %}
{% if color %}
{% set tag_color_class = 'content-tags__tags__tag--' ~ color %}
{% endif %}
</li>

<li class="content-tags__tags__tag {{ tag_color_class }}">
{% if addSpan %}
<span>{{ tag }}</span>
{% else %}
{{ tag }}
{% endif %}
</li>
{% endif %}

0 comments on commit 419f78c

Please sign in to comment.