mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:11:08 +08:00
FIX: If the image has no thumbnail, don't update the src
This commit is contained in:
@ -121,7 +121,8 @@ class CookedPostProcessor
|
||||
end
|
||||
|
||||
# not a hyperlink so we can apply
|
||||
img['src'] = upload.thumbnail_url if upload
|
||||
img['src'] = upload.thumbnail_url if (upload && upload.thumbnail_url.present?)
|
||||
|
||||
a = Nokogiri::XML::Node.new "a", @doc
|
||||
img.add_next_sibling(a)
|
||||
a["href"] = src
|
||||
|
Reference in New Issue
Block a user