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 <mathews.kyle+gatsbybot@gmail.com>
(cherry picked from commit 308d418)

Co-authored-by: liwenzhi <lwz7512@gmail.com>
Co-authored-by: Matt Kane <matt@gatsbyjs.com>
  • Loading branch information
3 people committed Feb 24, 2021
1 parent 49f19fd commit d806703
Showing 1 changed file with 4 additions and 1 deletion.
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.