Fix bug where an unset button_config causes a crash on build

This commit is contained in:
Eric Schultz 2018-07-24 16:49:00 -05:00
parent 612e2c56ec
commit d4610c4911

View file

@ -16,7 +16,7 @@ namespace :settings do
cdn_url= URI(Settings.cdn.url)
cdn_url.port = Settings.cdn.port if Settings.cdn.port
cdn_url = cdn_url.to_s
if (Settings.button_config.url)
if (Settings.button_config&.url)
cdn_url= URI(Settings.button_config.url).to_s
end
c = {button:{url:cdn_url,css:"#{cdn_url}/css/donate-button.v2.css"}}