summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/models/commit.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index 27fbdc3e386..9c5bfc5560a 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -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?