Skip to content

Commit

Permalink
fix: rubocop lint (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasalexandre9 authored Apr 8, 2024
1 parent c1fc0ac commit 48b658f
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ def self.from_plain_object(collection, filters)

if branch?(filters)
aggregator = filters[:aggregator].capitalize
conditions = []
filters[:conditions].each do |sub_tree|
conditions << from_plain_object(collection, sub_tree)
conditions = filters[:conditions].map do |sub_tree|
from_plain_object(collection, sub_tree)
end

return conditions.size == 1 ? conditions[0] : ConditionTreeBranch.new(aggregator, conditions)
Expand Down

0 comments on commit 48b658f

Please sign in to comment.