Small email fixes
This commit is contained in:
parent
bf2663346a
commit
8b4c030c16
|
@ -46,7 +46,7 @@ class UserNotifications < ActionMailer::Base
|
|||
@featured_topics, @new_topics = @featured_topics[0..4], @featured_topics[5..-1]
|
||||
|
||||
# Sort the new topics by score
|
||||
@new_topics.sort! {|a, b| b.score - a.score } if @new_topics.present?
|
||||
@new_topics.sort! {|a, b| (b.score || 0) - (a.score || 0) } if @new_topics.present?
|
||||
|
||||
@markdown_linker = MarkdownLinker.new(Discourse.base_url)
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ module Email
|
|||
end
|
||||
|
||||
# ensure no schemaless urls
|
||||
if img['src'].starts_with?("//")
|
||||
if img['src'] && img['src'].starts_with?("//")
|
||||
img['src'] = "http:" + img['src']
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue