-
Notifications
You must be signed in to change notification settings - Fork 24.2k
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 junk in React warnings in Logbox #44812
Conversation
|
Actually maybe this already got fixed on main due to #43166 because now source-less stacks get properly parsed? Still, I think this fix is worth getting in because pushing in the same array in two rounds that can potentially overlap doesn't make sense. This would prevent it breaking again next time the format changes. |
@gaearon thanks, I added a test but you're right that this was already fixed on main. I requested a pick to 0.74 but I don't think it made it in. |
@rickhanlonii has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@rickhanlonii has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@rickhanlonii merged this pull request in 32c3cd3. |
This pull request was successfully merged by @gaearon in 32c3cd3. When will my fix make it into a release? | How to file a pick request? |
Before all React errors showed junk like this:
This is because
isComponentStack
detected a component stack butparseComponentStack
couldn't actually parse it (it doesn't deal with React's current format likein Foo (created by FeedItemInner)
) socomponentStack
was an empty array, resulting in the next block of code pushing stuff intoargsWithoutComponentStack
again, thus repeating its args.The fix is not to do that. Result on my local copy:
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