Skip to content
Snippets Groups Projects
Commit b84fed0f authored by yisiliang's avatar yisiliang Committed by Sean McGivern
Browse files

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

parent 9276b10d
No related branches found
No related tags found
1 merge request!10495Merge Requests - Assignee
Loading
Loading
@@ -194,7 +194,11 @@ class Commit
def description
return safe_message if full_title.length >= 100
 
safe_message.split("\n", 2)[1].try(:chomp)
if safe_message.nil?
no_commit_message
else
safe_message.split("\n", 2)[1].try(:chomp)
end
end
 
def description?
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment