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:
@@ -4,6 +4,11 @@ const SelectRandomWord = (arrayWords) => {
|
||||
|
||||
Math.random() * (arrayWords.length - 0) + 0
|
||||
)
|
||||
|
||||
if (arrayWords[randomWord] === undefined) {
|
||||
|
||||
return SelectRandomWord()
|
||||
}
|
||||
|
||||
return arrayWords[randomWord]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user