diff --git a/lib/unleash/feature_toggle.rb b/lib/unleash/feature_toggle.rb index a6b3e5de..663a6b9e 100644 --- a/lib/unleash/feature_toggle.rb +++ b/lib/unleash/feature_toggle.rb @@ -104,7 +104,7 @@ def evaluate_parenthood(parent, context) end def get_parent(feature) - toggle_as_hash = Unleash&.toggles&.select{ |toggle| toggle['name'] == feature }&.first + toggle_as_hash = Unleash&.toggles&.find{ |toggle| toggle['name'] == feature } if toggle_as_hash.nil? Unleash.logger.debug "Unleash::Client.is_enabled? feature: #{feature} not found" return nil