Fix js unit test
This commit is contained in:
parent
6745431f17
commit
f2c6153343
|
|
@ -18,6 +18,9 @@ export interface ContinueData {
|
|||
}
|
||||
|
||||
function getLastCompleted(courseSlug: string, completionData: CourseCompletion[]) {
|
||||
if (completionData.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
const courseSessionsStore = useCourseSessionsStore();
|
||||
const courseSession = courseSessionsStore.courseSessionForCourse(courseSlug);
|
||||
return orderBy(completionData, ["updated_at"], "desc").find((c: CourseCompletion) => {
|
||||
|
|
@ -79,7 +82,7 @@ export class LearningPath implements WagtailLearningPath {
|
|||
}
|
||||
if (page.type === "learnpath.Circle") {
|
||||
const circle = Circle.fromJson(page, this);
|
||||
if (completionData) {
|
||||
if (completionData && completionData.length > 0) {
|
||||
circle.parseCompletionData(completionData);
|
||||
}
|
||||
if (topic) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue