diff --git a/packages/gatsby-source-contentful/src/rich-text.ts b/packages/gatsby-source-contentful/src/rich-text.ts index bf8fc064c7d5c..64db47890a4a1 100644 --- a/packages/gatsby-source-contentful/src/rich-text.ts +++ b/packages/gatsby-source-contentful/src/rich-text.ts @@ -42,7 +42,7 @@ export function renderRichText( json, links, }: { - json: unknown + json: Document links?: unknown }, makeOptions?: MakeOptions | Options @@ -52,7 +52,7 @@ export function renderRichText( ? makeOptions(generateLinkMaps(links as IContentfulRichTextLinks)) : makeOptions - return documentToReactComponents(json as Document, options) + return documentToReactComponents(json, options) } /**