diff --git a/packages/gatsby/cache-dir/head/head-export-handler-for-browser.js b/packages/gatsby/cache-dir/head/head-export-handler-for-browser.js index 8e986d6cd1209..53863b675e27f 100644 --- a/packages/gatsby/cache-dir/head/head-export-handler-for-browser.js +++ b/packages/gatsby/cache-dir/head/head-export-handler-for-browser.js @@ -64,7 +64,7 @@ if (process.env.BUILD_STAGE === `develop`) { if ( Array.isArray(args) && args.length >= 2 && - args[0]?.includes(`validateDOMNesting(...): %s cannot appear as`) && + args[0]?.includes?.(`validateDOMNesting(...): %s cannot appear as`) && (args[1] === `` || args[1] === ``) ) { return undefined