Skip to content

Commit

Permalink
fix(gatsby): Use optional chaining in onHeadRendered (gatsbyjs#37669)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marek Janča authored Feb 16, 2023
1 parent 1ff9a11 commit 66584a2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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] === `<html>` || args[1] === `<body>`)
) {
return undefined
Expand Down

0 comments on commit 66584a2

Please sign in to comment.