-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[charts] Type improvements & warnOnce
usage
#14792
Conversation
Deploy preview: https://deploy-preview-14792--material-ui-x.netlify.app/ |
if (process.env.NODE_ENV !== 'production' && value !== null) { | ||
warnOnce([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codebase convention. The idea was to make those ease to spot.
if (process.env.NODE_ENV !== 'production' && value !== null) { | |
warnOnce([ | |
if (process.env.NODE_ENV !== 'production') { | |
if (value !== null) { | |
warnOnce([ |
If we implement mui/mui-public#207, we might not need this convention as much, not sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I thought about dividing the checks too, but IIRC bundlers should remove it regardless of a second condition. Will divide it up 😅
CodSpeed Performance ReportMerging #14792 will not alter performanceComparing Summary
|
Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com> Signed-off-by: Jose C Quintas Jr <juniorquintas@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice refinement. 👏
Co-authored-by: Lukas Tyla <llukas.tyla@gmail.com> Signed-off-by: Jose C Quintas Jr <juniorquintas@gmail.com>
Just some improvements and consistency I've found when working on another PR