We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c379ce3 commit 1861731Copy full SHA for 1861731
packages/documentation/src/pages/_document.tsx
@@ -27,7 +27,7 @@ export default class MyDocument extends Document<MyDocumentProps> {
27
const initialProps = await Document.getInitialProps(ctx);
28
let theme = "light";
29
if (ctx && ctx.req) {
30
- ({ theme = "light" } = ctx.req.cookies);
+ ({ theme = "light" } = ctx.req.cookies ?? {});
31
} else if (typeof window !== "undefined") {
32
theme = Cookie.get("theme") || "light";
33
}
0 commit comments