Skip to content

Commit

Permalink
Remove unneeded optional
Browse files Browse the repository at this point in the history
  • Loading branch information
pjaspers committed May 1, 2020
1 parent 93ae516 commit 0a1a6ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/orbf/rules_engine/data/invoice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module RulesEngine
class ActivityItem < Orbf::RulesEngine::ValueObject::Model(:activity, :solution, :problem, :substitued, :variables)

def after_init
@indexed_variables = (variables || {}).index_by { |v| [v.state, v.activity_code] }
@indexed_variables = variables.index_by { |v| [v.state, v.activity_code] }
freeze
end

Expand Down

0 comments on commit 0a1a6ba

Please sign in to comment.