Commit 219cbf39 authored by Marin Jankovski's avatar Marin Jankovski

Check if project before calling count on issuable.

parent 69778103
...@@ -323,7 +323,9 @@ module ApplicationHelper ...@@ -323,7 +323,9 @@ module ApplicationHelper
entity_title = entity.to_s.humanize entity_title = entity.to_s.humanize
count = count =
if current_controller?(:issues) if project.nil?
""
elsif current_controller?(:issues)
" (#{project.issues.send(entity).count})" " (#{project.issues.send(entity).count})"
elsif current_controller?(:merge_requests) elsif current_controller?(:merge_requests)
" (#{project.merge_requests.send(entity).count})" " (#{project.merge_requests.send(entity).count})"
......
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