From 3b880c7a904f0a58b252cdca8d531b66c25e579b Mon Sep 17 00:00:00 2001
From: Arnaud Levy <contact@arnaudlevy.com>
Date: Thu, 20 Jul 2023 12:22:13 +0200
Subject: [PATCH] fix

---
 app/views/admin/communication/websites/pages/_list.html.erb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/app/views/admin/communication/websites/pages/_list.html.erb b/app/views/admin/communication/websites/pages/_list.html.erb
index 48d81eaeb..3308680ab 100644
--- a/app/views/admin/communication/websites/pages/_list.html.erb
+++ b/app/views/admin/communication/websites/pages/_list.html.erb
@@ -14,7 +14,9 @@
             <%= link_to page,
                         admin_communication_website_page_path(website_id: page.website.id, id: page.id),
                         class: "#{'draft' unless page.published?}" %>
-            <p class="small text-muted mb-0"><%= page.ancestors[1..-1].join(' / ') %></p>
+            <% if page.ancestors.many? %>
+              <p class="small text-muted mb-0"><%= page.ancestors.join(' / ') %></p>
+            <% end %>
           </td>
           <td>
             <% if page.featured_image.attached? && page.featured_image.representable? %>
-- 
GitLab