Skip to content

Commit

Permalink
Fix Contentful schema validation for null nodes for fixed/fluid media…
Browse files Browse the repository at this point in the history
… assets (#20794)
  • Loading branch information
ryanhefner authored and pvdz committed Jan 22, 2020
1 parent 56bc2b1 commit 6a3ae01
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/gatsby-source-contentful/src/extend-node-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,8 @@ const fixedNodeType = ({ name, getTracedSVG }) => {
},
resolve: (image, options, context) =>
Promise.resolve(resolveFixed(image, options)).then(node => {
if (!node) return null

return {
...node,
image,
Expand Down Expand Up @@ -494,6 +496,8 @@ const fluidNodeType = ({ name, getTracedSVG }) => {
},
resolve: (image, options, context) =>
Promise.resolve(resolveFluid(image, options)).then(node => {
if (!node) return null

return {
...node,
image,
Expand Down

0 comments on commit 6a3ae01

Please sign in to comment.