Not-nil is enough
This commit is contained in:
parent
c29336b78d
commit
2e27c830b1
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue