Skip to content

Commit

Permalink
fix: return null for non images
Browse files Browse the repository at this point in the history
  • Loading branch information
notrab authored Mar 29, 2021
1 parent 8547a91 commit 3410658
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gatsby-source-graphcms/src/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,10 @@ function makeResolveGatsbyImageData(cache) {
{ handle: filename, height, mimeType, width, url, internal },
options
) {
if (!mimeType.includes('image/')) {
return null
}

const imageDataArgs = {
...options,
pluginName: PLUGIN_NAME,
Expand Down

0 comments on commit 3410658

Please sign in to comment.