diff --git a/src/routes/kahootclone/create/components/Questions/question.svelte b/src/routes/kahootclone/create/components/Questions/question.svelte
index 4a976a6..e739168 100644
--- a/src/routes/kahootclone/create/components/Questions/question.svelte
+++ b/src/routes/kahootclone/create/components/Questions/question.svelte
@@ -8,7 +8,7 @@
let props = $props();
let index = props.index;
- let files;
+ let files = $state();
diff --git a/src/routes/kahootclone/create/logic/InsertGameInDB.js b/src/routes/kahootclone/create/logic/InsertGameInDB.js
index ce24e40..8d4e525 100644
--- a/src/routes/kahootclone/create/logic/InsertGameInDB.js
+++ b/src/routes/kahootclone/create/logic/InsertGameInDB.js
@@ -19,8 +19,8 @@ export async function createGame(questions, gamePin) {
});
if (gameError) {
- return;
Wait.v = false;
+ return;
}
// Prepare questions and answers for batch insertion
@@ -47,8 +47,9 @@ export async function createGame(questions, gamePin) {
);
if (questionsError) {
- return;
Wait.v = false;
+
+ return;
}
const answersData = [];
@@ -71,8 +72,8 @@ export async function createGame(questions, gamePin) {
});
if (answersError) {
+ Wait.v = false
return;
- Wait.v = false;
}
window.location.href = `/kahootclone/host?gamepin=${gamePin}`;