fix: public courses & collections bug

This commit is contained in:
swve 2023-12-23 12:20:54 +01:00
parent d3853c69ce
commit d939dc16eb
7 changed files with 87 additions and 46 deletions

View file

@ -42,7 +42,8 @@ const CourseClient = (props: any) => {
}
function isCourseStarted() {
const runs = course.trail.runs;
const runs = course.trail?.runs;
if (!runs) return false;
return runs.some((run: any) => run.status === "STATUS_IN_PROGRESS" && run.course_id === course.id);
}