Skip to content

Commit

Permalink
Only fix preview_url if it already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
KludgeKML committed Apr 18, 2024
1 parent d4f8bc5 commit fd466a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/presenters/publication_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def documents
docs.each do |doc|
doc["type"] = "html" unless doc["content_type"]
doc["type"] = "external" if doc["attachment_type"] == "external"
doc["preview_url"] = "#{doc['url']}/preview"
doc["preview_url"] = "#{doc['url']}/preview" if doc["preview_url"]
doc["alternative_format_contact_email"] = nil if doc["accessible"] == true
end
end
Expand Down

0 comments on commit fd466a6

Please sign in to comment.