From 46eae2213fee16e883ef59fdb87be78725d18bee Mon Sep 17 00:00:00 2001 From: Tero Elonen Date: Fri, 18 Nov 2022 15:10:19 +0200 Subject: [PATCH] UHF-7444: Add check for empty array item for metadata wrapper template --- templates/misc/metadata-wrapper.twig | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/templates/misc/metadata-wrapper.twig b/templates/misc/metadata-wrapper.twig index 83427544e..8a0256bb9 100644 --- a/templates/misc/metadata-wrapper.twig +++ b/templates/misc/metadata-wrapper.twig @@ -1,9 +1,11 @@
{% for item in items %} - {% include '@hdbt/misc/metadata-item.twig' with { - item_icon: item.icon, - item_label: item.label, - item_content: item.content - }%} + {% if item %} + {% include '@hdbt/misc/metadata-item.twig' with { + item_icon: item.icon, + item_label: item.label, + item_content: item.content + }%} + {% endif %} {% endfor %}