Refactoring commit--working
This commit is contained in:
parent
c0e9b9a23c
commit
bc8c1b1c54
@ -660,7 +660,7 @@ const loadGame = async (id) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!game) {
|
if (!game) {
|
||||||
game = createGame(id);
|
game = await createGame(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Clear out cached names from player colors and rebuild them
|
/* 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 */
|
/* Look for a new game with random words that does not already exist */
|
||||||
while (!id) {
|
while (!id) {
|
||||||
id = randomWords(4).join('-');
|
id = randomWords(4).join('-');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user