From 5e2dec712300b897cd8fda20b5b9c5049a81ac69 Mon Sep 17 00:00:00 2001 From: davidtrussler Date: Mon, 12 Feb 2024 16:47:59 +0000 Subject: [PATCH] Removes link where `title` is not present --- app/views/content_items/manuals/_updates.html.erb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/views/content_items/manuals/_updates.html.erb b/app/views/content_items/manuals/_updates.html.erb index df516302e..f305104f3 100644 --- a/app/views/content_items/manuals/_updates.html.erb +++ b/app/views/content_items/manuals/_updates.html.erb @@ -26,9 +26,11 @@
<% change_notes.each do |change_note_entry| %> <% change_note = change_note_entry.flatten.last %> -

- <%= link_to change_note["title"], change_note["base_path"], class: "govuk-link" %> -

+ <% if change_note["title"].present? %> +

+ <%= link_to change_note["title"], change_note["base_path"], class: "govuk-link" %> +

+ <% end %> <%= simple_format(change_note["change_note"], class: "govuk-body") %> <% end %>