fix: generate exercise with AI bug (#331)
This commit is contained in:
+2
-1
@@ -76,7 +76,8 @@
|
|||||||
if (!$lesson.id) return;
|
if (!$lesson.id) return;
|
||||||
|
|
||||||
toggleConfetti();
|
toggleConfetti();
|
||||||
const template: ExerciseTemplate = JSON.parse($completion);
|
const responseData = $completion.replace('```json', '').replace('```', '');
|
||||||
|
const template: ExerciseTemplate = JSON.parse(responseData);
|
||||||
await handleTemplateCreate(template);
|
await handleTemplateCreate(template);
|
||||||
toggleConfetti();
|
toggleConfetti();
|
||||||
$isLoading = false;
|
$isLoading = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user