Преглед изворни кода

数字单位键盘bug修改2946

zhouna пре 5 година
родитељ
комит
abefebcce7
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      src/common/components/NumberUnitPan/index.jsx

+ 2 - 2
src/common/components/NumberUnitPan/index.jsx

@@ -48,10 +48,10 @@ class NumberUnitPan extends Component{
   handleBack(e){
     e.stopPropagation();
      const {handleSelect,value} = this.props;
-    const len = value.length-1;
-    if(len<0){
+    if(value===undefined||value==''){
       return;
     }
+    const len = value.length-1;
     const text = value.substring(0,len);
     this.setState({
       value:text