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 {
static async getInitialProps(ctx) {
const initialProps = await Document.getInitialProps(ctx)
return {
...initialProps,
styles: <></>,
}
}
render() {
return ( return (
<Html> <Html>
<Head> <Head>
...@@ -13,4 +22,5 @@ export default function Document() { ...@@ -13,4 +22,5 @@ export default function Document() {
</body> </body>
</Html> </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