Browse Source

fix no data warning

Michael Wang 3 years ago
parent
commit
0ffdfbc783
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/features/OnlinePractice/OnlinePractice.vue

+ 1 - 1
src/features/OnlinePractice/OnlinePractice.vue

@@ -114,7 +114,7 @@ async function initData() {
   } else {
     examId = examList[0] && (examList[0].value as number);
   }
-  void getCourseList();
+  if (typeof examId === "number") void getCourseList();
 }
 
 onMounted(() => {