Skip to content

Commit

Permalink
fix(docs): fixed build error after upgrading next
Browse files Browse the repository at this point in the history
  • Loading branch information
mlaursen committed Mar 22, 2021
1 parent c379ce3 commit 1861731
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/documentation/src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default class MyDocument extends Document<MyDocumentProps> {
const initialProps = await Document.getInitialProps(ctx);
let theme = "light";
if (ctx && ctx.req) {
({ theme = "light" } = ctx.req.cookies);
({ theme = "light" } = ctx.req.cookies ?? {});
} else if (typeof window !== "undefined") {
theme = Cookie.get("theme") || "light";
}
Expand Down

0 comments on commit 1861731

Please sign in to comment.