瀏覽代碼

fix no data warning

Michael Wang 3 年之前
父節點
當前提交
0ffdfbc783
共有 1 個文件被更改,包括 1 次插入1 次删除
  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(() => {