Skip to content

Commit 0c16795

Browse files
committed
fixed a bug causing no new words to appear in time mode
1 parent c39ae3b commit 0c16795

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

public/js/script.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ function buildSentences() {
161161
}
162162

163163
function addWord() {
164-
let randomWord = words[Math.floor(Math.random() * words.length)];
164+
let language = words[config.language]
165+
let randomWord = language[Math.floor(Math.random() * language.length)];
165166
wordsList.push(randomWord);
166167
let w = "<div class='word'>";
167168
for (let c = 0; c < randomWord.length; c++) {

0 commit comments

Comments
 (0)