Skip to content

Commit

Permalink
fix(gatsby-source-wordpress):issue #29535 not finished createSchemaCu… (
Browse files Browse the repository at this point in the history
#29554) (#29712)

Co-authored-by: gatsbybot <[email protected]>
(cherry picked from commit 308d418)

Co-authored-by: liwenzhi <[email protected]>
Co-authored-by: Matt Kane <[email protected]>
  • Loading branch information
3 people authored Feb 24, 2021
1 parent 49f19fd commit d806703
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ const objectType = typeBuilderApi => {
})

// if all child fields are excluded, this type shouldn't exist.
if (!Object.keys(transformedFields).length) {
// check null first, otherwise cause:
// TypeError: Cannot convert undefined or null to object at Function.keys (<anonymous>)
// Also cause wordpress blog site build failure in createSchemaCustomization step
if (!transformedFields || !Object.keys(transformedFields).length) {
return
}

Expand Down

0 comments on commit d806703

Please sign in to comment.