Not-nil is enough

This commit is contained in:
Samuel Cochran 2016-04-23 15:49:55 +08:00
parent c29336b78d
commit 2e27c830b1
1 changed files with 1 additions and 1 deletions

View File

@ -126,7 +126,7 @@ module MailCatcher::Mail extend self
part ||= message_part_type(message_id, "application/xhtml+xml")
part ||= begin
message = message(message_id)
message if message.present? and ["text/html", "application/xhtml+xml"].include? message["type"]
message if message and ["text/html", "application/xhtml+xml"].include? message["type"]
end
end