mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-20 07:16:17 +08:00
fix(zen mode): test automatically stopping after 100 words
This commit is contained in:
parent
4eccfd632c
commit
3dda3f905c
|
@ -383,6 +383,10 @@ export function getWordOrder(): MonkeyTypes.FunboxWordOrder {
|
|||
}
|
||||
|
||||
export function getWordsLimit(): number {
|
||||
if (Config.mode === "zen") {
|
||||
return 0;
|
||||
}
|
||||
|
||||
let limit = 100;
|
||||
|
||||
const funboxToPush =
|
||||
|
@ -595,6 +599,8 @@ export async function generateWords(
|
|||
wordList = CustomText.getText();
|
||||
} else if (Config.mode === "quote") {
|
||||
wordList = await getQuoteWordList(language, wordOrder);
|
||||
} else if (Config.mode === "zen") {
|
||||
wordList = [];
|
||||
}
|
||||
|
||||
const limit = getWordsLimit();
|
||||
|
@ -607,6 +613,10 @@ export async function generateWords(
|
|||
currentWordset = await Wordset.withWords(wordList);
|
||||
console.debug("Wordset", currentWordset);
|
||||
|
||||
if (limit === 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
let stop = false;
|
||||
let i = 0;
|
||||
while (!stop) {
|
||||
|
|
Loading…
Reference in a new issue