fix: add NODE_ENV for Icon warning (#43574)

This commit is contained in:
lijianan 2023-07-15 16:03:53 +08:00 committed by GitHub
parent 38474628fd
commit 94541eda67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,9 @@
import warning from '../_util/warning'; import warning from '../_util/warning';
const Icon: React.FC = () => { const Icon: React.FC = () => {
warning(false, 'Icon', 'Empty Icon'); if (process.env.NODE_ENV !== 'production') {
warning(false, 'Icon', 'Empty Icon');
}
return null; return null;
}; };