You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: e2e-tests/development-runtime/cypress/integration/head-function-export/warnings.js
-7
Original file line number
Diff line number
Diff line change
@@ -18,11 +18,4 @@ describe(`Head function export should warn`, () => {
18
18
)}`
19
19
)
20
20
})
21
-
22
-
it(`for scripts that could use the script component`,()=>{
23
-
cy.get(`@consoleWarn`).should(
24
-
`be.calledWith`,
25
-
`Do not add scripts here. Please use the <Script> component in your page template instead. For more info see: https://www.gatsbyjs.com/docs/reference/built-in-components/gatsby-script/`
Copy file name to clipboardExpand all lines: packages/gatsby/cache-dir/head/utils.js
+3-8
Original file line number
Diff line number
Diff line change
@@ -39,20 +39,15 @@ if (process.env.NODE_ENV !== `production`) {
39
39
}
40
40
}
41
41
42
-
export{warnOnce}
43
-
44
42
/**
45
43
* Warn for invalid tags in head.
46
44
* @param {string} tagName
47
45
*/
48
46
exportfunctionwarnForInvalidTags(tagName){
49
47
if(process.env.NODE_ENV!==`production`){
50
-
constwarning=
51
-
tagName!==`script`
52
-
? `<${tagName}> is not a valid head element. Please use one of the following: ${VALID_NODE_NAMES.join(
53
-
`, `
54
-
)}`
55
-
: `Do not add scripts here. Please use the <Script> component in your page template instead. For more info see: https://www.gatsbyjs.com/docs/reference/built-in-components/gatsby-script/`
48
+
constwarning=`<${tagName}> is not a valid head element. Please use one of the following: ${VALID_NODE_NAMES.join(
0 commit comments