Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix junk in React warnings in Logbox (#44812)
Summary: Before all React errors showed junk like this: ![Screenshot 2024-06-06 at 06 24 38](https://github.com/facebook/react-native/assets/810438/40be3133-e31d-43e8-b04d-ffbc5b462027) This is because `isComponentStack` detected a component stack but `parseComponentStack` couldn't actually parse it (it doesn't deal with React's current format like `in Foo (created by FeedItemInner)`) so `componentStack` was an empty array, resulting in the next block of code pushing stuff into `argsWithoutComponentStack` _again_, thus repeating its args. The fix is not to do that. Result on my local copy: ![Screenshot 2024-06-06 at 06 24 24](https://github.com/facebook/react-native/assets/810438/8f3d32d9-6f28-472c-be34-c802a0e2f161) Ofc this doesn't actually show the component stack but that was broken before too. I edited in-place in my `node_modules` so I haven't verified this 100% works on main. Hope this is useful! ## Changelog: [General] [Fixed] - Remove accidental duplication in React warnings in Logbox Pull Request resolved: #44812 Reviewed By: cortinico Differential Revision: D58240357 Pulled By: rickhanlonii fbshipit-source-id: b6ecb659d3b393e497caf5e7b2087a8e529f1b28
- Loading branch information