Unverified Commit 01629113 authored by José Fernando Höwer Barbosa's avatar José Fernando Höwer Barbosa Committed by GitHub

Fix Type to solve issue found in #36008 (#36671)

* Fix Type to solve issue found in #36008

It seems the types inside of `DocumentInitialProps` have inconsistencies with the type coming from a fragment 

The issue is documented here https://github.com/vercel/next.js/issues/36008

* Add test
Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
parent 88747a26
import { Html, Head, Main, NextScript } from 'next/document' import Document, { Html, Head, Main, NextScript } from 'next/document'
export default function Document() { export default class MyDocument extends Document {
return ( static async getInitialProps(ctx) {
<Html> const initialProps = await Document.getInitialProps(ctx)
<Head> return {
<meta property="og:url" content="https://nextjs.org/docs" /> ...initialProps,
<meta name="theme-color" content="#ffffff" /> styles: <></>,
</Head> }
<body> }
<Main />
<NextScript /> render() {
</body> return (
</Html> <Html>
) <Head>
<meta property="og:url" content="https://nextjs.org/docs" />
<meta name="theme-color" content="#ffffff" />
</Head>
<body>
<Main />
<NextScript />
</body>
</Html>
)
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment