Skip to content

Commit

Permalink
fix: validate is string before upcase
Browse files Browse the repository at this point in the history
  • Loading branch information
gastonfournier committed Aug 28, 2024
1 parent 62b0bfd commit fa51677
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/unleash/constraint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def matches_constraint?(context)
context_value = context.get_by_name(self.context_name)

v.map!(&:upcase) if self.case_insensitive
context_value = context_value.upcase if self.case_insensitive
context_value = context_value.upcase if self.case_insensitive # && context_value.is_a?(String)

OPERATORS[self.operator].call(context_value, v)
end
Expand Down

0 comments on commit fa51677

Please sign in to comment.