diff --git a/lib/feature.rb b/lib/feature.rb index 0e90ad9a333..a8324d99c10 100644 --- a/lib/feature.rb +++ b/lib/feature.rb @@ -72,7 +72,11 @@ class Feature end def flipper - @flipper ||= (Gitlab::SafeRequestStore[:flipper] ||= build_flipper_instance) + if Gitlab::SafeRequestStore.active? + Gitlab::SafeRequestStore[:flipper] ||= build_flipper_instance + else + @flipper ||= build_flipper_instance + end end def build_flipper_instance