Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
gardleopard committed Oct 16, 2023
1 parent 7bdbe31 commit c691c1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/unleash/feature_toggle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c691c1b

Please sign in to comment.