fix(zen mode): test automatically stopping after 100 words

This commit is contained in:
Miodec 2024-04-30 13:38:58 +02:00
parent 4eccfd632c
commit 3dda3f905c

View file

@ -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) {