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 609625b commit 35ef8e8Copy full SHA for 35ef8e8
tools/tools.tsx
@@ -10,9 +10,11 @@ type SuperJSONProps<P> = P & {
10
};
11
12
export function withSuperJSONProps<P>(
13
- gssp: GetServerSideProps<P>,
+ gssp: GetServerSideProps<P> | undefined,
14
exclude: string[] = []
15
-): GetServerSideProps<SuperJSONProps<P>> {
+): GetServerSideProps<SuperJSONProps<P>> | undefined {
16
+ if (gssp === undefined)
17
+ return undefined;
18
return async function withSuperJSON(...args) {
19
const result = await gssp(...args);
20
@@ -55,6 +57,8 @@ export function withSuperJSONInitProps(
55
57
gip: any,
56
58
59
): any {
60
+ if (gip === undefined)
61
62
return async function withSuperJSON(...args: any[]) {
63
const result = await gip(...args);
64
0 commit comments