Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(nextjs): Guard for case where getInitialProps may return undefined #9342

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

lforst
Copy link
Member

@lforst lforst commented Oct 24, 2023

Fixes #9066

Consideration: If users return undefined we will override that with an object, which is arguably fine since when undefined is returned you will likely not depend on it in any way.

@lforst lforst requested review from mydea and Lms24 October 24, 2023 09:21
@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 82.66 KB (+0.18% 🔺)
@sentry/browser (incl. Tracing, Replay) - Webpack with treeshaking flags (gzipped) 71.77 KB (+0.16% 🔺)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 30.94 KB (+0.96% 🔺)
@sentry/browser - Webpack (gzipped) 21.26 KB (+0.03% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 73.03 KB (-0.01% 🔽)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 28.93 KB (+0.78% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped) 21.09 KB (+0.03% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 233.81 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 87.77 KB (+0.77% 🔺)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 62.76 KB (+0.04% 🔺)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 31.71 KB (+0.81% 🔺)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 83.05 KB (+0.09% 🔺)
@sentry/react - Webpack (gzipped) 21.29 KB (+0.03% 🔺)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 99.43 KB (+0.05% 🔺)
@sentry/nextjs Client - Webpack (gzipped) 47.83 KB (+0.58% 🔺)

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds reasonable!

@lforst lforst merged commit 7c84181 into develop Oct 24, 2023
52 checks passed
@lforst lforst deleted the lforst-fix-9066 branch October 24, 2023 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wrapGetInitialPropsWithSentry throws an exception if getInitialProps returns undefined
3 participants