mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 18:30:26 -06:00
Fix undefined method for Nil class error.
This commit is contained in:
parent
5d53eefcab
commit
d79fee9ff3
@ -18,7 +18,11 @@ module Jobs
|
||||
].map do |url|
|
||||
if url.present?
|
||||
url = url.dup
|
||||
url.gsub!(s3_cdn_hostname, s3_hostname) if s3_cdn_hostname.present?
|
||||
|
||||
if s3_cdn_hostname.present? && s3_hostname.present?
|
||||
url.gsub!(s3_cdn_hostname, s3_hostname)
|
||||
end
|
||||
|
||||
url[base_url] && url[url.index(base_url)..-1]
|
||||
else
|
||||
nil
|
||||
|
Loading…
Reference in New Issue
Block a user