Skip to content

Commit

Permalink
[gatsby-source-contentful] Delete original link regardless of ID vali…
Browse files Browse the repository at this point in the history
…dity (#3592)

* wip

* [gatsby-source-contentful] Delete original link regardless of presence of resolvable ID
  • Loading branch information
sarahatwork authored and KyleAMathews committed Jan 19, 2018
1 parent d1763f5 commit cb0a6c5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/gatsby-source-contentful/src/normalize.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,12 +256,13 @@ exports.createContentTypeNodes = ({
entryItemFieldValue &&
entryItemFieldValue.sys &&
entryItemFieldValue.sys.type &&
entryItemFieldValue.sys.id &&
resolvable.has(entryItemFieldValue.sys.id)
entryItemFieldValue.sys.id
) {
entryItemFields[`${entryItemFieldKey}___NODE`] = mId(
entryItemFieldValue.sys.id
)
if (resolvable.has(entryItemFieldValue.sys.id)) {
entryItemFields[`${entryItemFieldKey}___NODE`] = mId(
entryItemFieldValue.sys.id
)
}
delete entryItemFields[entryItemFieldKey]
}
}
Expand Down

0 comments on commit cb0a6c5

Please sign in to comment.