Skip to content

Commit fd466a6

Browse files
committed
Only fix preview_url if it already exists
1 parent d4f8bc5 commit fd466a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/presenters/publication_presenter.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def documents
2121
docs.each do |doc|
2222
doc["type"] = "html" unless doc["content_type"]
2323
doc["type"] = "external" if doc["attachment_type"] == "external"
24-
doc["preview_url"] = "#{doc['url']}/preview"
24+
doc["preview_url"] = "#{doc['url']}/preview" if doc["preview_url"]
2525
doc["alternative_format_contact_email"] = nil if doc["accessible"] == true
2626
end
2727
end

0 commit comments

Comments
 (0)