Skip to content

Commit

Permalink
fix empty check
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelemusiani committed Jun 7, 2024
1 parent b4bb8e2 commit e29e0ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/routes/dash/[course]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
const m = teachingsFilter(degree, i, true);
const e = teachingsFilter(degree, i, false);
if (m != null) mandatory.push({ year: i, teachings: namesToTeachings(m) });
if (e != null) electives.push({ year: i, teachings: namesToTeachings(e) });
if (m != null && m.length != 0) mandatory.push({ year: i, teachings: namesToTeachings(m) });
if (e != null && e.length != 0) electives.push({ year: i, teachings: namesToTeachings(e) });
}
return { mandatory, electives };
Expand Down

0 comments on commit e29e0ba

Please sign in to comment.