From 0d8575d5a77314611fa1a050686788af709538bb Mon Sep 17 00:00:00 2001 From: exyi Date: Sat, 17 Oct 2020 14:08:46 +0000 Subject: [PATCH] Add points for new tasks --- frontend/src/Editor.svelte | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/src/Editor.svelte b/frontend/src/Editor.svelte index 742854a..61ba4aa 100644 --- a/frontend/src/Editor.svelte +++ b/frontend/src/Editor.svelte @@ -197,6 +197,7 @@ requires: [], position: [0, 0], title: t.name, + points: t.points! })); tasks.tasks = [...tasks.tasks, ...newDescriptors]; } @@ -207,9 +208,7 @@ return t } const a = await grabAssignment(t.taskReference) - if (a.points == null) - throw Error(`Points are null for ${t.taskReference}`) - return { ...t, points: a.points } + return { ...t, points: a.points! } })) tasks = { ...tasks, tasks: loadedTasks }