fix that you can generate ai options without a topic

This commit is contained in:
RezHackXYZ 2025-06-05 16:22:04 +05:30
parent ba4025988f
commit b2906bd53b

View file

@ -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", "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( await toast.promise(
(async () => { (async () => {
try { try {