mirror of
https://github.com/FranP-code/Hangman-game-with-React.git
synced 2025-10-13 00:42:32 +00:00
bugs fix
This commit is contained in:
@@ -9,6 +9,7 @@ const BringTheWords = async (language = false, category = false, selectedWord) =
|
||||
|
||||
|
||||
console.log(category)
|
||||
console.log(language)
|
||||
|
||||
if (!language) {
|
||||
|
||||
@@ -28,8 +29,10 @@ const BringTheWords = async (language = false, category = false, selectedWord) =
|
||||
const data = collection(db, `hangman_words/${language}/${category}`)
|
||||
const result = await getDocs(data)
|
||||
|
||||
|
||||
const words = await result.docs.map(doc => doc.id)
|
||||
const word = await SelectRandomWord(await words)
|
||||
|
||||
return await word
|
||||
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user