Skip to content

Commit

Permalink
fix: assert draft is defined in logs server loading
Browse files Browse the repository at this point in the history
  • Loading branch information
VeeIsForVanana committed Aug 8, 2024
1 parent be10477 commit b3a97de
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { assert } from "$lib/assert";

export async function load({ locals: { db }, parent }) {
const { available, selected, draft, labs } = await parent();

assert(typeof(draft) !== 'undefined')
const choiceRecords = await db.getFacultyChoiceRecords(draft.draft_id);

return { available, selected, draft, labs, choiceRecords };
Expand Down

0 comments on commit b3a97de

Please sign in to comment.