From 0cbb4695f2a434515b10fd72cb992311bebbdeac Mon Sep 17 00:00:00 2001 From: Pablo Veintimilla Date: Tue, 7 Nov 2017 19:34:08 -0500 Subject: [PATCH] Fix check if badge is set This change allow set 0 as a badge. --- Resources/views/layout/macros.html.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Resources/views/layout/macros.html.twig b/Resources/views/layout/macros.html.twig index 2b06e6df..b60b545d 100644 --- a/Resources/views/layout/macros.html.twig +++ b/Resources/views/layout/macros.html.twig @@ -13,7 +13,7 @@ {% if item.icon %} {% endif %} {{ item.label|trans }} - {% if item.badge %} + {% if item.badge is not same as(false) %} {{ item.badge }} {% endif %} {% if item.hasChildren %}{% endif %} @@ -45,7 +45,7 @@ {% macro menu_item_content(item, defaultIcon) %} {{ item.label|trans }} - {% if item.badge %} + {% if item.badge is not same as(false) %} {{ item.badge }} {% endif %} {% endmacro %}