Fix styled-jsx styles missing when _document.getInitialProps bypasses defaultGetInitialProps
When a custom _document.getInitialProps calls ctx.renderPage() directly
instead of Document.getInitialProps(ctx), it returns { html, head } without
a styles key. Add a fallback to collect styles from the jsxStyleRegistry
(already populated during renderPage) when docProps.styles is absent.
Co-Authored-By:
Claude <noreply@anthropic.com>
Showing
Please
register
or
sign in
to comment