Refactor Feature.flipper method

parent 88fa9a3c
...@@ -72,7 +72,11 @@ class Feature ...@@ -72,7 +72,11 @@ class Feature
end end
def flipper 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 end
def build_flipper_instance def build_flipper_instance
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment