Refactor Feature.flipper method
This commit is contained in:
parent
88fa9a3c31
commit
75ddf0d48d
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue