Skip to content

Commit 8f847ea

Browse files
authored
fix(next): Guard against missing serverSideProps (#7517)
1 parent c1e1db7 commit 8f847ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/nextjs/src/server/wrapGetServerSidePropsWithSentry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export function wrapGetServerSidePropsWithSentry(
4444
typeof tracedGetServerSideProps
4545
>);
4646

47-
if ('props' in serverSideProps) {
47+
if (serverSideProps && 'props' in serverSideProps) {
4848
const requestTransaction = getTransactionFromRequest(req);
4949
if (requestTransaction) {
5050
serverSideProps.props._sentryTraceData = requestTransaction.toTraceparent();

0 commit comments

Comments
 (0)