natasha vor 3 Jahren
Ursprung
Commit
2349cc480d
1 geänderte Dateien mit 11 neuen und 9 gelöschten Zeilen
  1. 11 9
      src/components/Adult/preview/TextProblem.vue

+ 11 - 9
src/components/Adult/preview/TextProblem.vue

@@ -64,15 +64,17 @@ export default {
         let curQue = JSON.parse(JSON.stringify(this.curQue));
         curQue.option.forEach((dItem, dIndex) => {
             let paraArr = []
-            dItem.detail.wordsList.forEach((sItem, sIndex) => {
-                this.mergeWordSymbol(dItem.detail.wordsList, sItem, sIndex);
-                let obj = {
-                    pinyin: sItem.pinyin,
-                    chs: sItem.chs,
-                    isShow: sItem.isShow,
-                };
-                paraArr.push(obj);
-            })
+            if(dItem.detail){
+                dItem.detail.wordsList.forEach((sItem, sIndex) => {
+                    this.mergeWordSymbol(dItem.detail.wordsList, sItem, sIndex);
+                    let obj = {
+                        pinyin: sItem.pinyin,
+                        chs: sItem.chs,
+                        isShow: sItem.isShow,
+                    };
+                    paraArr.push(obj);
+                })
+            }
             this.$set(_this.curQue.option[dIndex].detail,'resArr',paraArr)
         })
     },