Skip to content

Commit

Permalink
Fix support for image-less blog posts (#1525)
Browse files Browse the repository at this point in the history
  • Loading branch information
rogermparent authored Jul 4, 2020
1 parent 390a39a commit a0282d3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gatsby/utils/resolvers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ function sourcePathResolver({
return async function resolveBySourcePath(source, args, context, info) {
const fieldValue = context.defaultFieldResolver(source, args, context, info)

// Bail out early with null if no value was provided
if (!fieldValue) return null

// Allow for callers to provide a function that modifies the field value into
// the actual relative path of a file.
const sourcePath = resolvePath ? resolvePath(fieldValue) : fieldValue
Expand Down

0 comments on commit a0282d3

Please sign in to comment.