-
Notifications
You must be signed in to change notification settings - Fork 45.6k
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
Redundant condition in react-devtools-shared #20905
Comments
Yeah, looks like maybe this got broken during a refactor (ce65df7).
if (typeof data[Symbol.iterator] === 'function') { Actually since we check the type right above, maybe the condition should have just been deleted entirely. (I don't remember this code very well.) |
Hey, I'm gonna pick this up and try to get a PR through to tidy this :) This would be my first issue in this repo. I've given the contribution guidelines a read through, and so will do my best to follow all the CoC and best practices in there. |
This issue is all yours @erikaho! 😄 I've added the "good first issue (taken)" label so that others will know not to start work on the issue. If you change your mind about the issue, no worries! Just let me know so that I can remove the label and free it up for someone else to claim. Cheers! |
Hey! Raised a PR for this. Couldn't find any unit tests that covered the |
This is not important but it seems that this if statement is superfluous since
typeof
always returns a string.react/packages/react-devtools-shared/src/hydration.js
Line 246 in 553440b
The text was updated successfully, but these errors were encountered: