Check if project before calling count on issuable.
This commit is contained in:
parent
6977810360
commit
219cbf3927
|
@ -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})"
|
||||
|
|
Loading…
Reference in New Issue