diff --git a/components/badge/AntNumber.jsx b/components/badge/AntNumber.jsx index c94d4dfa8a..50e82b8899 100644 --- a/components/badge/AntNumber.jsx +++ b/components/badge/AntNumber.jsx @@ -31,11 +31,7 @@ class AntNumber extends React.Component { } let length = count.toString().length; let childrenWap = []; - const a = childrenWap.length || 0; - if (length < a) { - childrenWap.splice(0, 1); - } - let i = a;//length - 1; + let i = 0; while (i < length) { const children = this.getNumberOnly(i); childrenWap.unshift(children); @@ -50,7 +46,6 @@ class AntNumber extends React.Component { return childrenWap; } - updateChildren(props) { if (typeof props.count === 'string') { return this.setState({