diff --git a/packages/gatsby-plugin-mdx/gatsby/source-nodes.js b/packages/gatsby-plugin-mdx/gatsby/source-nodes.js index 04971a3f8fdb7..f07aab4f9e640 100644 --- a/packages/gatsby-plugin-mdx/gatsby/source-nodes.js +++ b/packages/gatsby-plugin-mdx/gatsby/source-nodes.js @@ -44,9 +44,9 @@ async function getCounts({ mdast }) { } return { - paragraphs: counts.ParagraphNode, - sentences: counts.SentenceNode, - words: counts.WordNode, + paragraphs: counts.ParagraphNode || 0, + sentences: counts.SentenceNode || 0, + words: counts.WordNode || 0, } }