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.
getInitialProps
1 parent a0ff516 commit 7c84181Copy full SHA for 7c84181
packages/nextjs/src/common/wrapGetInitialPropsWithSentry.ts
@@ -46,7 +46,7 @@ export function wrapGetInitialPropsWithSentry(origGetInitialProps: GetInitialPro
46
const initialProps: {
47
_sentryTraceData?: string;
48
_sentryBaggage?: string;
49
- } = await tracedGetInitialProps.apply(thisArg, args);
+ } = (await tracedGetInitialProps.apply(thisArg, args)) ?? {}; // Next.js allows undefined to be returned from a getInitialPropsFunction.
50
51
const requestTransaction = getTransactionFromRequest(req) ?? hub.getScope().getTransaction();
52
if (requestTransaction) {
0 commit comments