From d10d3d12e20ae9e261aa2b9dca6c2b0484229ae7 Mon Sep 17 00:00:00 2001
From: Marco Gandi <12765-elgandoz@users.noreply.drupalcode.org>
Date: Thu, 6 Jun 2024 18:28:09 +0000
Subject: [PATCH] Toolbar menu: add check before adding home link

---
 templates/navigation/menu--toolbar--gin.html.twig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/templates/navigation/menu--toolbar--gin.html.twig b/templates/navigation/menu--toolbar--gin.html.twig
index 06853fdfb..94c655384 100644
--- a/templates/navigation/menu--toolbar--gin.html.twig
+++ b/templates/navigation/menu--toolbar--gin.html.twig
@@ -48,7 +48,7 @@
       %}
 
       {# Add Home if it doesn't exist #}
-      {% if menu_level == 0 and loop.index == 1 and item.gin_id != 'admin_toolbar_tools-help' %}
+      {% if menu_level == 0 and loop.index == 1 and item.gin_id is not empty and item.gin_id != 'admin_toolbar_tools-help' %}
         <li class="menu-item menu-item--expanded menu-item__tools">
           {% if icon_default == false and icon_path != '' %}
             <a href="{{ path('<front>') }}" class="toolbar-logo" data-drupal-link-system-path="<front>">
-- 
GitLab