lib/wcc/contentful/model_builder.rb in wcc-contentful-1.7.0 vs lib/wcc/contentful/model_builder.rb in wcc-contentful-1.7.1
- old
+ new
@@ -87,10 +87,10 @@
raw.dig('sys', 'revision'),
OpenStruct.new(context).freeze
)
@metadata = WCC::Contentful::Metadata.new(
- raw['metadata']
+ raw['metadata'] || {}
)
typedef.fields.each_value do |f|
raw_value = raw.dig('fields', f.name)