diff --git a/frontend/src/components/Landing.tsx b/frontend/src/components/Landing.tsx index 9fde90d..647fda4 100644 --- a/frontend/src/components/Landing.tsx +++ b/frontend/src/components/Landing.tsx @@ -41,6 +41,8 @@ export default function Landing({ onLoadExam, history, onResume, onClearHistory, try { const r = await fetch(path) const data = await r.json() as unknown + const msg = validateExam(data) + if (msg) throw new Error(msg) onLoadExam(parseExam(data)) } catch (e) { setErr(`Could not load sample: ${(e as Error).message}`) @@ -59,7 +61,8 @@ export default function Landing({ onLoadExam, history, onResume, onClearHistory,