소스 검색

清除药品说明输添加容错

zhangxc 6 년 전
부모
커밋
2347f3dad9
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/store/actions/treat.js

+ 2 - 1
src/store/actions/treat.js

@@ -61,7 +61,8 @@ export const setDrugInfo = (state, action) => {
 
 export const clearDrugInfo = (state, action) => {
     const res = JSON.parse(JSON.stringify(state));
-    res.drugInfo.drugDesc = [];
+    // res.drugInfo.drugDesc = [];
+    if (res.drugInfo && res.drugInfo.drugDesc) { res.drugInfo.drugDesc = [];}
     return res
 }