We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8108c73 commit 7584ee7Copy full SHA for 7584ee7
lib/optimizely/config/datafile_project_config.rb
@@ -644,6 +644,10 @@ def get_holdouts_for_flag(flag_id)
644
645
return [] if @holdouts.nil? || @holdouts.empty?
646
647
+ # Validate that the flag exists in the datafile
648
+ flag_exists = @feature_flags.any? { |flag| flag['id'] == flag_id }
649
+ return [] unless flag_exists
650
+
651
# Check cache and return persistent holdouts
652
return @flag_holdouts_map[flag_id] if @flag_holdouts_map.key?(flag_id)
653
0 commit comments