zhangjie 2 rokov pred
rodič
commit
4f2a15fe8e

+ 8 - 2
src/modules/question/components/import-edit/TextAnswerQuestion.vue

@@ -79,7 +79,9 @@ export default {
     initData() {
       this.modalForm = this.$objAssign(getInitQuestionModel(), this.question);
       this.initAnswer(this.question.quesAnswer);
-      this.quesAnswer = this.modalForm.quesAnswer[0] || null;
+      this.quesAnswer = this.modalForm.quesAnswer[0] || {
+        sections: [],
+      };
     },
     initAnswer(answer) {
       let quesAnswer = [];
@@ -92,7 +94,11 @@ export default {
       }
       if (this.checkAnswerFormatValid(quesAnswer)) {
         this.modalForm.quesAnswer = quesAnswer.map((item) =>
-          isAnEmptyRichText(item) ? null : item
+          isAnEmptyRichText(item)
+            ? {
+                sections: [],
+              }
+            : item
         );
       } else {
         this.modalForm.quesAnswer = [];