diff --git a/src/components/Login/index.js b/src/components/Login/index.js index 5e3a8a86b7cb2dbe567a8fb7e52e5aa3184d21e0..58ce02973908c3e8e7716458db9c7e4263636a0c 100644 --- a/src/components/Login/index.js +++ b/src/components/Login/index.js @@ -81,6 +81,9 @@ class Login extends Component { const TabChildren = []; const otherChildren = []; React.Children.forEach(children, (item) => { + if (!item) { + return; + } // eslint-disable-next-line if (item.type.__ANT_PRO_LOGIN_TAB) { TabChildren.push(item); @@ -104,7 +107,7 @@ class Login extends Component { {otherChildren} - ) : children + ) : [...children] }