This is an automated email from the ASF dual-hosted git repository. juzhiyuan pushed a commit to branch feat-minor-issues in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git
commit 74cf95e1508070399325734036b4ff8ba1b4233a Author: juzhiyuan <[email protected]> AuthorDate: Mon Nov 9 19:44:36 2020 +0800 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 2d41bce..b1057af 100644 --- a/web/src/components/Upstream/UpstreamForm.tsx +++ b/web/src/components/Upstream/UpstreamForm.tsx @@ -617,7 +617,7 @@ const UpstreamForm: React.FC<Props> = forwardRef( component: <InActiveHealthCheck />, }, ].map(({ label, name, component }) => ( - <> + <div key={label}> <Form.Item label={label} name={name} valuePropName="checked" key={label}> <Switch disabled={readonly} /> </Form.Item> @@ -629,7 +629,7 @@ const UpstreamForm: React.FC<Props> = forwardRef( return null; }} </Form.Item> - </> + </div> ))} </PanelSection> </Form> diff --git a/web/src/pages/Route/components/Step1/MatchingRulesView.tsx b/web/src/pages/Route/components/Step1/MatchingRulesView.tsx index 5f09d17..9ba0b80 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<RouteModule.Step1PassProps> = ({ </Space> ), }, - ]; + ].filter(item => Object.keys(item).length) const renderModal = () => ( <Modal
