Skip to content

Commit

Permalink
Merge pull request #540 from mrlvsb/student-transfer-hotfix
Browse files Browse the repository at this point in the history
[Fix] Student transfer hotfix
  • Loading branch information
geordi authored Oct 17, 2024
2 parents a0dffa5 + 1483bef commit fdebe6a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/src/StudentTransfer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ $: canTransfer = assignments.length && notAssignedCount == 0 && uniqueAssignment
async function loadClasses() {
const res = await fetch('/api/classes/all');
data = await res.json();
semester = Object.keys(data.semesters)[Object.keys(data.semesters).length - 1];
if (Object.keys(data.semesters).length > 0) {
semester = Object.keys(data.semesters)[0];
}
}
async function loadClass() {
Expand Down

0 comments on commit fdebe6a

Please sign in to comment.