lib/wcc/contentful/store/base.rb in wcc-contentful-1.2.0 vs lib/wcc/contentful/store/base.rb in wcc-contentful-1.2.1
- old
+ new
@@ -59,14 +59,14 @@
delete(json.dig('sys', 'id'))
else
set(json.dig('sys', 'id'), json)
end
- if (prev_rev = prev&.dig('sys', 'revision')) && (next_rev = json.dig('sys', 'revision'))
- if next_rev < prev_rev
- # Uh oh! we overwrote an entry with a prior revision. Put the previous back.
- return index(prev)
- end
+ if (prev_rev = prev&.dig('sys', 'revision')) &&
+ (next_rev = json.dig('sys', 'revision')) &&
+ (next_rev < prev_rev)
+ # Uh oh! we overwrote an entry with a prior revision. Put the previous back.
+ return index(prev)
end
case type
when 'DeletedEntry', 'DeletedAsset'
nil