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
|
|
@ -24,10 +24,13 @@ function ActivityIndicators(props: Props) {
|
|||
|
||||
|
||||
function isActivityDone(activity: any) {
|
||||
let run = props.course.trail.runs.find((run: any) => run.course_id == props.course.id);
|
||||
let run = props.course.trail?.runs.find((run: any) => run.course_id == props.course.id);
|
||||
if (run) {
|
||||
return run.steps.find((step: any) => step.activity_id == activity.id);
|
||||
}
|
||||
else {
|
||||
return false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue