浏览代码

数字单位键盘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