mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-05-02 17:04:02 -04:00
FIX: If the image has no thumbnail, don't update the src
This commit is contained in:
parent
028af5fec6
commit
456cff17f8
1 changed files with 2 additions and 1 deletions
|
@ -121,7 +121,8 @@ class CookedPostProcessor
|
||||||
end
|
end
|
||||||
|
|
||||||
# not a hyperlink so we can apply
|
# 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
|
a = Nokogiri::XML::Node.new "a", @doc
|
||||||
img.add_next_sibling(a)
|
img.add_next_sibling(a)
|
||||||
a["href"] = src
|
a["href"] = src
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue