summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorMarin Jankovski <maxlazio@gmail.com>2015-04-20 10:21:15 +0200
committerMarin Jankovski <maxlazio@gmail.com>2015-04-24 13:53:22 +0200
commit219cbf3927c9b6f42a47364a0d268b3ed3e82f4d (patch)
treec3b657296478a773941111670150e67d3edea866 /app/helpers
parent69778103608633cab1329c90a6cbdbc6c9b64bd7 (diff)
downloadgitlab-ce-219cbf3927c9b6f42a47364a0d268b3ed3e82f4d.tar.gz
Check if project before calling count on issuable.
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/application_helper.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 25acf3ca1b5..6e86400a4f6 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -323,7 +323,9 @@ module ApplicationHelper
entity_title = entity.to_s.humanize
count =
- if current_controller?(:issues)
+ if project.nil?
+ ""
+ elsif current_controller?(:issues)
" (#{project.issues.send(entity).count})"
elsif current_controller?(:merge_requests)
" (#{project.merge_requests.send(entity).count})"