From 94541eda67eec294dd6b1cf170f31b42a1017946 Mon Sep 17 00:00:00 2001 From: lijianan <574980606@qq.com> Date: Sat, 15 Jul 2023 16:03:53 +0800 Subject: [PATCH] fix: add NODE_ENV for Icon warning (#43574) --- components/icon/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/icon/index.ts b/components/icon/index.ts index 7cc36928c5..d985d56650 100755 --- a/components/icon/index.ts +++ b/components/icon/index.ts @@ -1,7 +1,9 @@ import warning from '../_util/warning'; const Icon: React.FC = () => { - warning(false, 'Icon', 'Empty Icon'); + if (process.env.NODE_ENV !== 'production') { + warning(false, 'Icon', 'Empty Icon'); + } return null; };