Skip to content
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

refactor: remove type judgment when defining warning props #13553

Merged
merged 1 commit into from
Sep 4, 2018

Conversation

gebilaoxiong
Copy link
Contributor

The judgment in this code seems to be invalid:

https://github.com/facebook/react/blob/master/packages/react/src/ReactElement.js#L233-L234

Because props.$$typeof is always undefined.

I can't see the effect of this judgment from the unit test.

If he is necessary. Please tell me the special use case.

I will add a test case here.

@gebilaoxiong gebilaoxiong changed the title refactor: remove emove type judgment when defining warning props refactor: remove type judgment when defining warning props Sep 4, 2018
@pull-bot
Copy link

pull-bot commented Sep 4, 2018

Details of bundled changes.

Comparing: 25d48a7...ebf2977

schedule

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
schedule.development.js n/a n/a 0 B 19.17 KB 0 B 5.74 KB UMD_DEV
schedule.production.min.js n/a n/a 0 B 3.16 KB 0 B 1.53 KB UMD_PROD

Generated by 🚫 dangerJS

@gaearon
Copy link
Collaborator

gaearon commented Sep 4, 2018

I don't understand what this code was for, and #5744 doesn't seem to contain hints about it.
Let's remove it.

@gaearon gaearon merged commit 955393c into facebook:master Sep 4, 2018
@gebilaoxiong gebilaoxiong deleted the remove-unnecessary-condition branch September 4, 2018 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants