FIX: makes sure email-preview is set

This commit is contained in:
Joffrey JAFFEUX 2018-05-23 13:44:39 +02:00 committed by GitHub
parent dd76ba90b3
commit 391ee4dfbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ after_initialize do
on(:reduce_cooked) do |fragment|
container = fragment.css(".discourse-local-date").first
if container
if container && container.attributes["data-email-preview"]
preview = container.attributes["data-email-preview"].value
container.content = preview
end