mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
FIX: picture would be hidden when [details] block was closed in the composer
This commit is contained in:
@ -98,7 +98,10 @@ class CookedPostProcessor
|
||||
return unless image_sizes.present?
|
||||
image_sizes.each do |image_size|
|
||||
url, size = image_size[0], image_size[1]
|
||||
return [size["width"], size["height"]] if url && size && url.include?(src)
|
||||
if url && url.include?(src) &&
|
||||
size && size["width"].to_i > 0 && size["height"].to_i > 0
|
||||
return [size["width"], size["height"]]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user