Skip to content

Commit

Permalink
ensure string is passed to truncate since errors with integers
Browse files Browse the repository at this point in the history
  • Loading branch information
hudajkhan committed Sep 18, 2024
1 parent 539d806 commit 5720f50
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<% caption_text = solr_documents_features_block.document_caption(doc_presenter, solr_documents_features_block.primary_caption_field, default: Spotlight::PageConfigurations::DOCUMENT_TITLE_KEY) %>

<a href="#" title="<%= caption_text %>">
<%= truncate(caption_text, length: 95) %>
<%= truncate(caption_text.to_s, length: 95) %>
</a>
<% if solr_documents_features_block.secondary_caption? %>
<p><%= solr_documents_features_block.document_caption(doc_presenter, solr_documents_features_block.secondary_caption_field) %></p>
Expand Down

0 comments on commit 5720f50

Please sign in to comment.