Check if project before calling count on issuable.
This commit is contained in:
parent
6977810360
commit
219cbf3927
1 changed files with 3 additions and 1 deletions
|
@ -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})"
|
||||||
|
|
Loading…
Reference in a new issue