protect against EmailReplyTrimmer returning nil

This commit is contained in:
http://jneen.net/ 2016-11-18 18:57:37 +09:00
parent 03753ff146
commit 017579fe14
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ module Gitlab
encoding = body.encoding
body = EmailReplyTrimmer.trim(body)
body = EmailReplyTrimmer.trim(body) or return ""
# [jneen] not using /\s+$/ here because that deletes empty lines
body = body.gsub(/[ \t]$/, '')