Skip to content

Commit

Permalink
[Fix] Student transfer hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
geordi committed Oct 17, 2024
1 parent 755890b commit 148101d
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 148101d

Please sign in to comment.