Skip to content

Commit

Permalink
Fix Edge-Case Bug in FieldsResource#hydrate_nonlocalized_fields (#205)
Browse files Browse the repository at this point in the history
`locale` was being used in the `result` assignment before itself being assigned.
  • Loading branch information
Daniel Wright authored and dlitvakb committed Aug 23, 2019
1 parent c421209 commit 9421898
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/contentful/fields_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ def hydrate_localized_fields(includes, errors, entries)
end

def hydrate_nonlocalized_fields(includes, errors, entries)
result = { locale => {} }
locale = internal_resource_locale
result = { locale => {} }
raw['fields'].each do |name, value|
name = Support.snakify(name, @configuration[:use_camel_case])
result[locale][name.to_sym] = coerce(
Expand Down

0 comments on commit 9421898

Please sign in to comment.