diff --git a/components/button/button.tsx b/components/button/button.tsx index dc2f062a11..2211cad152 100644 --- a/components/button/button.tsx +++ b/components/button/button.tsx @@ -12,6 +12,10 @@ function isString(str) { // Insert one space between two chinese characters automatically. function insertSpace(child) { + // Check the child if is undefined or null. + if (child == null) { + return; + } if (isString(child.type) && isTwoCNChar(child.props.children)) { return React.cloneElement(child, {}, child.props.children.split('').join(' '));