From eab0ca8a0b2950dbbcf6662c34b2fc8313ba9bde Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Thu, 21 Sep 2017 11:03:14 +0100 Subject: Fixes dashboard/projects empty state showing when viewing personal projects This was caused by the `@projects` value being empty when the current user does not have any personal projects. --- app/helpers/projects_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/helpers') diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index ddeff490d3a..21fb17e06d6 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -239,8 +239,8 @@ module ProjectsHelper end end - def has_projects_or_name?(projects, params) - !!(params[:name] || any_projects?(projects)) + def show_projects?(projects, params) + !!(params[:personal] || params[:name] || any_projects?(projects)) end private -- cgit v1.2.1