diff --git a/server/routes/games.ts b/server/routes/games.ts index 6957769..a3a1797 100755 --- a/server/routes/games.ts +++ b/server/routes/games.ts @@ -660,7 +660,7 @@ const loadGame = async (id) => { } if (!game) { - game = createGame(id); + game = await createGame(id); } /* Clear out cached names from player colors and rebuild them @@ -5014,7 +5014,7 @@ const resetGame = (game) => { } } -const createGame = (id) => { +const createGame = async (id) => { /* Look for a new game with random words that does not already exist */ while (!id) { id = randomWords(4).join('-');