summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-08-03 11:35:35 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2015-08-03 11:35:50 +0200
commit0b9e43f9dd0bef980d72af81a562bd0e947eee8d (patch)
treedc607f1fda653cfdc89d82b33026253f0892a57e
parentdc51460c34b185ec85cb27c69767878eeb02779a (diff)
downloadgitlab-ci-0b9e43f9dd0bef980d72af81a562bd0e947eee8d.tar.gz
Fix truncate_first_line if message is niltruncate-fix
-rw-r--r--app/helpers/commits_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb
index 37a9f34..c212e8b 100644
--- a/app/helpers/commits_helper.rb
+++ b/app/helpers/commits_helper.rb
@@ -17,6 +17,6 @@ module CommitsHelper
end
def truncate_first_line(message, length = 50)
- truncate(message.lines.first.chomp, length: length)
+ truncate(message.each_line.first.chomp, length: length) if message
end
end