mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
fix: public courses & collections bug
This commit is contained in:
parent
d3853c69ce
commit
d939dc16eb
7 changed files with 87 additions and 46 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue