lib/wcc/contentful/simple_client/response.rb in wcc-contentful-1.4.0 vs lib/wcc/contentful/simple_client/response.rb in wcc-contentful-1.5.0.rc1
- old
+ new
@@ -102,10 +102,10 @@
end
def includes
@includes ||=
raw['includes']&.each_with_object({}) do |(_t, entries), h|
- entries.each { |e| h[e.dig('sys', 'id')] = e }
+ entries&.each { |e| h[e.dig('sys', 'id')] = e }
end || {}
end
end
class SyncResponse < Response