mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-13 15:36:42 +08:00
fixed a bug where the account page would not load, fixed a bug where the letter I would appear again, this time with punctuation
This commit is contained in:
parent
be5ce7297b
commit
4ed1f0679c
1 changed files with 3 additions and 3 deletions
|
@ -190,10 +190,10 @@ function addWord() {
|
|||
let language = words[config.language];
|
||||
let randomWord = language[Math.floor(Math.random() * language.length)];
|
||||
previousWord = wordsList[wordsList.length - 1];
|
||||
while (randomWord.indexOf(' ') > -1) {
|
||||
while (randomWord.indexOf(' ') > -1 || (!config.punctuation && randomWord == "I") || randomWord.indexOf(' ') > -1) {
|
||||
randomWord = language[Math.floor(Math.random() * language.length)];
|
||||
}
|
||||
if (config.punctuation && config.mode != "custom" || (!config.punctuation && randomWord == "I") || randomWord.indexOf(' ') > -1){
|
||||
if (config.punctuation && config.mode != "custom"){
|
||||
randomWord = punctuateWord(previousWord, randomWord, wordsList.length, 0)
|
||||
}
|
||||
wordsList.push(randomWord);
|
||||
|
@ -623,7 +623,7 @@ function restartTest() {
|
|||
clearIntervals();
|
||||
time = 0;
|
||||
afkDetected = false;
|
||||
resultHistoryChart = false;
|
||||
resultVisible = false;
|
||||
wpmHistory = [];
|
||||
setFocus(false);
|
||||
hideCaret();
|
||||
|
|
Loading…
Reference in a new issue