-
Notifications
You must be signed in to change notification settings - Fork 47k
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 a crash in Suspense with findDOMNode #15195
Conversation
parentA = maybeSuspense; | ||
parentB = maybeSuspense; | ||
a = maybeSuspenseFragment; | ||
b = maybeSuspenseFragment; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if it's legit to have them pointing to the same one. I haven't really thought whether this makes sense.
ReactDOM: size: 🔺+0.1%, gzip: 🔺+0.1% Details of bundled changes.Comparing: 8e9a013...43e7858 react-dom
react-art
react-native-renderer
react-test-renderer
react-reconciler
Generated by 🚫 dangerJS |
maybeSuspense.memoizedState !== null | ||
) { | ||
parentA = maybeSuspense; | ||
parentB = maybeSuspense; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it’s possible for the suspense to have an alternate and we might be coming from the disconnected tree.
Fixed in #15312 |
Another attempt at #14198.
Fixes the internal crash we've recently observed.
I know this fix might have weird semantics (which DOM node should it return for a suspended tree?) but it still seems better to not crash in this case IMO.