diff --git a/src/modules/gatsby-transform-node/gatsby-node.ts b/src/modules/gatsby-transform-node/gatsby-node.ts index 7ba9c8a2..48d33660 100644 --- a/src/modules/gatsby-transform-node/gatsby-node.ts +++ b/src/modules/gatsby-transform-node/gatsby-node.ts @@ -112,7 +112,7 @@ const decodeOptionsE = (options: PatchedPluginOptions) => ), ); } - if (!Array.isArray(options.fields)) { + if (options.fields != null && !Array.isArray(options.fields)) { return E.left(new Error('Fields must be an array of field options')); } if (