dillon1000/react
Commit
Browse files Read constructor name more carefully (#29954)
## Summary Sometimes `constructor` happens to be the name of an unrelated property, or we may be dealing with a `Proxy` that intercepts every read. Verify the constructor is a function before using its name, and reset the name anyway if it turns out not to be serializable. Fixes some cases of the devtools crashing and becoming inoperable upon attempting to inspect components whose props are Hookstate `State`s. ## How did you test this change? Installed a patched version of the extension and confirmed that it solves the problem. --------- Co-authored-by: Ruslan Lesiutin <[email protected]>
Changed paths1 file
First-parent comparisonpackages/react-devtools-shared/src/hydration.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…