diff --git a/app/views/shared/navigation/_breadcrumbs.html.erb b/app/views/shared/navigation/_breadcrumbs.html.erb index d71d318ed..8182c2b8c 100644 --- a/app/views/shared/navigation/_breadcrumbs.html.erb +++ b/app/views/shared/navigation/_breadcrumbs.html.erb @@ -1,5 +1,6 @@ <% if @breadcrumbs_items&.length %> - <% @breadcrumbs_items.each { |item| item[:label] = "(A) #{item[:label]}" if item[:archived] }%> + <% archived_exists = @breadcrumbs_items.any? { |item| item[:archived] } %> + <% @breadcrumbs_items.each { |item| item[:label] = "(A) #{item[:label]}" if archived_exists } %> <% shortened = @breadcrumbs_items.length > 4 %> <% if shortened %>