Skip to content

Commit 1861731

Browse files
committed
fix(docs): fixed build error after upgrading next
1 parent c379ce3 commit 1861731

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/documentation/src/pages/_document.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default class MyDocument extends Document<MyDocumentProps> {
2727
const initialProps = await Document.getInitialProps(ctx);
2828
let theme = "light";
2929
if (ctx && ctx.req) {
30-
({ theme = "light" } = ctx.req.cookies);
30+
({ theme = "light" } = ctx.req.cookies ?? {});
3131
} else if (typeof window !== "undefined") {
3232
theme = Cookie.get("theme") || "light";
3333
}

0 commit comments

Comments
 (0)