Sfoglia il codice sorgente

fix: 推荐试题null过滤

ChenYangfan 6 anni fa
parent
commit
9242a07989
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      src/views/quiz/DoRecommendQuestion.vue

+ 1 - 1
src/views/quiz/DoRecommendQuestion.vue

@@ -98,7 +98,7 @@ export default {
         questionNum: 5,
         knowledgeId: this.selectedKnowledgeIdList
       }).then(res => {
-        this.questions = res.map(question => ({
+        this.questions = res.filter(_ => _ !== null).map(question => ({
           ...question,
           studentAnswer: { answer: '' }
         }))