From 793686f648b90a7fd7415cf9ac4b34091ba21b61 Mon Sep 17 00:00:00 2001 From: xialiang <1818147@qq.com> Date: Wed, 9 Mar 2022 15:06:16 +0800 Subject: [PATCH] bug --- web/src/pages/mockExamination/paper/index.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/web/src/pages/mockExamination/paper/index.tsx b/web/src/pages/mockExamination/paper/index.tsx index 9417d67..f109d14 100644 --- a/web/src/pages/mockExamination/paper/index.tsx +++ b/web/src/pages/mockExamination/paper/index.tsx @@ -340,8 +340,8 @@ const CardList = () => { let score = 0 // 当前分类下试题总数 - if (JSON.stringify(rulesPaperInfo) !== "{}") { - rulesPaperInfo.question_type_count.map((e, i) => { + if (JSON.stringify(rulesPaperInfo) !== "{}" && rulesPaperInfo.length > 0) { + rulesPaperInf?.question_type_count.map((e, i) => { if (e.question_type === questionType) { num = e.count questionName = e.type_name @@ -444,7 +444,6 @@ const CardList = () => { {questionNow.id ? questionNow.index[0] + 1 : ""} 、{questionNow?.question_stem} - {/* {console.log(questionNow.answerId, 'answerId', questionNow.answerId)} */}