From c92bda95e177c27c327df53aba78d1fc8ae61907 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Thu, 11 Oct 2018 10:45:01 +0800 Subject: [PATCH] Fix the build. --- lib/email/receiver.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/email/receiver.rb b/lib/email/receiver.rb index c5fe6280a97..618556691c8 100644 --- a/lib/email/receiver.rb +++ b/lib/email/receiver.rb @@ -484,10 +484,12 @@ module Email end def subject - @subject ||= begin - mail_subject = @mail.subject.delete("\u0000") - mail_subject.presence || I18n.t("emails.incoming.default_subject", email: @from_email) - end + @subject ||= + if mail_subject = @mail.subject + mail_subject.delete("\u0000") + else + I18n.t("emails.incoming.default_subject", email: @from_email) + end end def find_user(email)