diff --git a/app/views/finders/_spelling_suggestion.html.erb b/app/views/finders/_spelling_suggestion.html.erb index c98551f60f..bf5cced67a 100644 --- a/app/views/finders/_spelling_suggestion.html.erb +++ b/app/views/finders/_spelling_suggestion.html.erb @@ -1,3 +1,5 @@ +<% # we want an empty string if there are no suggestions on page load %> +<% _spelling_suggestion = '' %> <% if @spelling_suggestion_presenter.suggestions.any? %>
Did you mean <% @spelling_suggestion_presenter.suggestions.each do |suggestion| %> @@ -5,6 +7,10 @@ class: "govuk-link govuk-!-font-weight-bold", :data => suggestion[:data_attributes] %> + <% _spelling_suggestion << suggestion[:keywords] %> <% end %>
-<% end %> \ No newline at end of file +<% end %> +<% content_for :head do %> + +<% end %>