FIX: Handle nil case for avatar, just in case

This commit is contained in:
Robin Ward 2019-10-24 14:02:51 -04:00 committed by romanrizzi
parent 069d358c80
commit 5f01814397

View File

@ -80,6 +80,7 @@ module DiscourseNarrativeBot
end
def base64_image_data(data)
return "" if data.blank?
"xlink:href=\"data:image/png;base64,#{Base64.strict_encode64(data)}\""
end