From b2906bd53b8d59ea80a12986fe899bbb4f913be0 Mon Sep 17 00:00:00 2001 From: RezHackXYZ Date: Thu, 5 Jun 2025 16:22:04 +0530 Subject: [PATCH] fix that you can generate ai options without a topic --- src/routes/kahootclone/create/Buttons.svelte | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/routes/kahootclone/create/Buttons.svelte b/src/routes/kahootclone/create/Buttons.svelte index bd66d33..2e944b2 100644 --- a/src/routes/kahootclone/create/Buttons.svelte +++ b/src/routes/kahootclone/create/Buttons.svelte @@ -63,6 +63,11 @@ The user's topic of interest is: "Enter the topic and number of questions you want with any instructions for the ai, note: doing this will delete all you previous questions and its not undo able", ); + if (!userInput) { + toast.error("Please enter the topic to generate questions."); + return; + } + await toast.promise( (async () => { try {