Browse Source

现病史添加症状报错2821

zhouna 5 years ago
parent
commit
b9f2cdddf4
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/components/SpreadDrop/index.jsx

+ 2 - 2
src/components/SpreadDrop/index.jsx

@@ -389,8 +389,8 @@ class SpreadDrop extends Component{
     const {placeholder,value,show,data,order,type,tagType,pos,defaulted,showVal,CommonSymptoms,select_start,i,boxMark} = this.props;
     const {tmpDom,left} = this.state;
     let showDefaulted = this.ifDefault();
-    let showV = showDefaulted&&value===undefined?showVal:value;       //未选中过值时展示默认选中
-    const noPushData = (+tagType===11)&&(!data[1]||data[1].questionDetailList.length===0);    //无推送数据
+    let showV = showDefaulted&&value===undefined?showVal:value;      //未选中过值时展示默认选中
+    const noPushData = (+tagType===11)&&(!data[1]||!data[1].questionDetailList||data[1].questionDetailList.length===0);    //无推送数据
     const showCommonData = (+type===2)&&(+tagType===11)&&noPushData&&CommonSymptoms.length>0?true:false;
     if(!show&&tmpDom){
       $(tmpDom).parent().prev().attr({"contentEditable":true})