Skip to content

Commit

Permalink
Fix check if badge is set
Browse files Browse the repository at this point in the history
This change allow set 0 as a badge.
  • Loading branch information
pabloveintimilla authored Nov 8, 2017
1 parent 7b57db3 commit 0cbb469
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Resources/views/layout/macros.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<a href="{{ item.hasChildren ? '#': '/' in item.route ? item.route : path(item.route, item.routeArgs) }}">
{% if item.icon %} <i class="{{ item.icon }}"></i> {% endif %}
<span>{{ item.label|trans }}</span>
{% if item.badge %}
{% if item.badge is not same as(false) %}
<small class="label pull-right bg-{{ item.badgeColor }}">{{ item.badge }}</small>
{% endif %}
{% if item.hasChildren %}<i class="fa fa-angle-left pull-right"></i>{% endif %}
Expand Down Expand Up @@ -45,7 +45,7 @@
{% macro menu_item_content(item, defaultIcon) %}
<i class="{{ item.icon|default(defaultIcon) }}"></i>
<span>{{ item.label|trans }}</span>
{% if item.badge %}
{% if item.badge is not same as(false) %}
<small class="label pull-right bg-{{ item.badgeColor }}">{{ item.badge }}</small>
{% endif %}
{% endmacro %}
Expand Down

0 comments on commit 0cbb469

Please sign in to comment.