diff --git a/packages/gatsby-plugin-cms/src/gatsby-node.ts b/packages/gatsby-plugin-cms/src/gatsby-node.ts index e80c9d8d3f..4fa1d85f6a 100644 --- a/packages/gatsby-plugin-cms/src/gatsby-node.ts +++ b/packages/gatsby-plugin-cms/src/gatsby-node.ts @@ -96,7 +96,7 @@ export const sourceNodes = async ( const nodes = await Promise.all([ fetchAllRemoteNodes(gatsbyApi, options), fetchAllLocalNodes(gatsbyApi), - ]).then(([x, y]) => [...x, ...y]) + ]).then(([x, y]) => [...x, ...y].filter(Boolean)) createCmsSchemaCustomization(gatsbyApi, nodes)