mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
Fix NoMethodError
in TopicEmbed#find_remote
Stop TopicEmbed#find_remote from generating `NoMethodError: undefined method `empty?' for nil:NilClass` exceptions
This commit is contained in:
parent
388f51eed7
commit
bbfa5c7df1
1 changed files with 1 additions and 1 deletions
|
@ -80,7 +80,7 @@ class TopicEmbed < ActiveRecord::Base
|
|||
doc.search(tags.keys.join(',')).each do |node|
|
||||
url_param = tags[node.name]
|
||||
src = node[url_param]
|
||||
unless (src.empty?)
|
||||
unless (src.nil? || src.empty?)
|
||||
begin
|
||||
uri = URI.parse(src)
|
||||
unless uri.host
|
||||
|
|
Loading…
Reference in a new issue