diff options
-rw-r--r-- | app/controllers/concerns/with_performance_bar.rb | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/app/controllers/concerns/with_performance_bar.rb b/app/controllers/concerns/with_performance_bar.rb index 6a71d2c5312..84b67be7c6a 100644 --- a/app/controllers/concerns/with_performance_bar.rb +++ b/app/controllers/concerns/with_performance_bar.rb @@ -9,15 +9,7 @@ module WithPerformanceBar return false unless Gitlab::PerformanceBar.enabled?(current_user) cookie = cookies[:perf_bar_enabled] - - unless cookie.present? - if Rails.env.development? - cookies[:perf_bar_enabled] = 'true' - return true - else - return false - end - end + cookie ||= (cookies[:perf_bar_enabled] = 'true') if Rails.env.development? cookie === 'true' end |