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 error handling in resolveClientReference #31332

Merged

Conversation

unstubbable
Copy link
Collaborator

@unstubbable unstubbable commented Oct 23, 2024

When a React Server Consumer Manifest does not include an entry for a client reference ID, we must not try to look up the export name (or '*') for the client reference. Otherwise this will fail with TypeError: Cannot read properties of undefined (reading '...') instead of the custom error we intended to throw.

When a React Server Consumer Manifest does not include an entry for a
client reference ID, we must not try to look up the export name (or
`'*'`) of the client reference. Otherwise this will fail with
`TypeError: Cannot read properties of undefined (reading '...')` instead
of the custom error message we intended to throw.
Copy link

vercel bot commented Oct 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 23, 2024 0:26am

@react-sizebot
Copy link

Comparing: b4cbdc5...2e58882

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB +0.05% 1.82 kB 1.82 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 506.86 kB 506.86 kB = 90.71 kB 90.71 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB +0.05% 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 511.79 kB 511.79 kB = 91.42 kB 91.42 kB
facebook-www/ReactDOM-prod.classic.js = 604.26 kB 604.26 kB = 106.92 kB 106.92 kB
facebook-www/ReactDOM-prod.modern.js = 580.48 kB 580.48 kB = 103.00 kB 103.01 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 70c8334

@eps1lon eps1lon requested a review from sebmarkbage October 23, 2024 12:53
@sebmarkbage sebmarkbage merged commit 2dc5beb into facebook:main Oct 23, 2024
184 checks passed
@unstubbable unstubbable deleted the harden-resolve-client-reference branch October 23, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants