diff --git a/packages/gatsby/src/bootstrap/index.js b/packages/gatsby/src/bootstrap/index.js index 8adc768cdd327..261007bd6d7a5 100644 --- a/packages/gatsby/src/bootstrap/index.js +++ b/packages/gatsby/src/bootstrap/index.js @@ -73,7 +73,7 @@ module.exports = async (args: BootstrapArgs) => { ) // theme gatsby configs can be functions or objects - if (config.__experimentalThemes) { + if (config && config.__experimentalThemes) { const themesConfig = await Promise.mapSeries( config.__experimentalThemes, async ([themeName, themeConfig]) => {