Skip to content

Commit

Permalink
修复只有一门课情况检测出错的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
cxOrz committed Apr 3, 2023
1 parent 45a5eb9 commit 69ff74b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/server/src/functions/activity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ export const traverseCourseActivity = async (args: BasicCookie & { courses: Cour
// 特殊情况,只有一门课
if (courses.length === 1) {
try {
i++;
return await getActivity({ course: courses[0], ...cookies });
} catch (err) {
// 该课程无有效签到
console.log('未检测到有效签到活动!');
return 'NoActivity';
}
}

Expand Down

0 comments on commit 69ff74b

Please sign in to comment.