dillon1000/react
Commit
Browse files fix[react-devtools]: restore original args when recording errors (#30091)
## Summary When DevTools frontend and backend are connected, we patch console in 2 places: - `patch()`, when renderer is attached to: - listen to any errors / warnings emitted - append component stack if requested by the user - `patchForStrictMode()`, when React notifies about that the next invocation is about to happed during StrictMode `patchForStrictMode()` will always be at the top of the patch stack, because it is called at runtime when React notifies React DevTools, because of this, `patch()` may receive already modified arguments (with stylings for dimming), we should attempt to restore the original arguments ## How did you test this change? Look at yellow warnings on the element view: | Before | After | | --- | --- | |  |  |
Changed paths1 file
First-parent comparisonpackages/react-devtools-shared/src/backend/console.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…