Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/controllers/concerns/with_performance_bar.rb10
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