Explorar el Código

成绩查询 questionList 可能为空

Michael Wang hace 3 años
padre
commit
b4184bea0b
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      src/features/mark/CommonMarkBody.vue

+ 2 - 1
src/features/mark/CommonMarkBody.vue

@@ -315,7 +315,8 @@ async function processSplitConfig() {
       if (useMarkResult) {
         trackLists = markResult.trackList;
       } else {
-        trackLists = store.currentTask.questionList
+        // 成绩查询 questionList 可能为空
+        trackLists = (store.currentTask.questionList || [])
           .map((q) => q.trackList)
           .reduce((acc, t) => {
             acc = acc.concat(t);