Skip to content

Commit

Permalink
Merge pull request #670 from Shopify/uk-fix-typed-overrides-defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
paracycle authored Dec 17, 2021
2 parents 39dd40f + 214841e commit 8cb17b5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/tapioca/helpers/config_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def config_options(options)
.returns(Thor::CoreExt::HashWithIndifferentAccess)
end
def merge_options(*options)
options.each_with_object(Thor::CoreExt::HashWithIndifferentAccess.new) do |option, result|
merged = options.each_with_object({}) do |option, result|
result.merge!(option || {}) do |_, this_val, other_val|
if this_val.is_a?(Hash) && other_val.is_a?(Hash)
Thor::CoreExt::HashWithIndifferentAccess.new(this_val.merge(other_val))
Expand All @@ -77,6 +77,8 @@ def merge_options(*options)
end
end
end

Thor::CoreExt::HashWithIndifferentAccess.new(merged)
end
end
end

0 comments on commit 8cb17b5

Please sign in to comment.