Skip to content

Commit

Permalink
fix(sync): disable link resolution for entries without fields
Browse files Browse the repository at this point in the history
For example deleted entries from the Sync API
  • Loading branch information
Benedikt Rötsch authored and axe312ger committed Aug 10, 2017
1 parent 22d9966 commit 9c7cb48
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/mixins/link-getters.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ import memoize from 'lodash/memoize'
export default function mixinLinkGetters (items, includes) {
const linkGetter = memoize(getLinksFromIncludes, memoizationResolver)
each(items, (item) => {
setLocalizedFieldGetters(item.fields, !!item.sys.locale)
if (item.fields) {
setLocalizedFieldGetters(item.fields, !!item.sys.locale)
}
})

/**
Expand Down

0 comments on commit 9c7cb48

Please sign in to comment.