From 74cf95e1508070399325734036b4ff8ba1b4233a Mon Sep 17 00:00:00 2001 From: juzhiyuan Date: Mon, 9 Nov 2020 19:44:36 +0800 Subject: [PATCH] fix: react warnings --- web/src/components/Upstream/UpstreamForm.tsx | 4 ++-- web/src/pages/Route/components/Step1/MatchingRulesView.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/components/Upstream/UpstreamForm.tsx b/web/src/components/Upstream/UpstreamForm.tsx index 2d41bce96c..b1057afdbb 100644 --- a/web/src/components/Upstream/UpstreamForm.tsx +++ b/web/src/components/Upstream/UpstreamForm.tsx @@ -617,7 +617,7 @@ const UpstreamForm: React.FC = forwardRef( component: , }, ].map(({ label, name, component }) => ( - <> +
@@ -629,7 +629,7 @@ const UpstreamForm: React.FC = forwardRef( return null; }} - +
))} diff --git a/web/src/pages/Route/components/Step1/MatchingRulesView.tsx b/web/src/pages/Route/components/Step1/MatchingRulesView.tsx index 5f09d17408..9ba0b80161 100644 --- a/web/src/pages/Route/components/Step1/MatchingRulesView.tsx +++ b/web/src/pages/Route/components/Step1/MatchingRulesView.tsx @@ -149,7 +149,7 @@ const MatchingRulesView: React.FC = ({ ), }, - ]; + ].filter(item => Object.keys(item).length) const renderModal = () => (