mirror of
https://github.com/discourse/discourse.git
synced 2025-01-07 21:35:06 +08:00
FIX: Handle nil case for avatar, just in case
This commit is contained in:
parent
069d358c80
commit
5f01814397
|
@ -80,6 +80,7 @@ module DiscourseNarrativeBot
|
||||||
end
|
end
|
||||||
|
|
||||||
def base64_image_data(data)
|
def base64_image_data(data)
|
||||||
|
return "" if data.blank?
|
||||||
"xlink:href=\"data:image/png;base64,#{Base64.strict_encode64(data)}\""
|
"xlink:href=\"data:image/png;base64,#{Base64.strict_encode64(data)}\""
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user