Commit b84fed0f authored by yisiliang's avatar yisiliang Committed by Sean McGivern

to avoid “NoMethodError (undefined method `split' for nil:NilClass)” while safe_message is nil.

parent 9276b10d
...@@ -194,8 +194,12 @@ class Commit ...@@ -194,8 +194,12 @@ class Commit
def description def description
return safe_message if full_title.length >= 100 return safe_message if full_title.length >= 100
if safe_message.nil?
no_commit_message
else
safe_message.split("\n", 2)[1].try(:chomp) safe_message.split("\n", 2)[1].try(:chomp)
end end
end
def description? def description?
description.present? description.present?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment