fix(word generation): test sometimes stopping in a repeated practice words test

This commit is contained in:
Miodec 2025-06-24 18:59:16 +02:00
parent b0e7e2eaa4
commit 0bc380f8e1
2 changed files with 7 additions and 1 deletions

View file

@ -656,7 +656,10 @@ export async function addWord(): Promise<void> {
e,
"Error while getting next word. Please try again later"
),
-1
-1,
{
important: true,
}
);
}
}

View file

@ -749,6 +749,9 @@ export async function getNextWord(
(Config.mode === "custom" &&
CustomText.getLimitMode() === "word" &&
wordIndex < CustomText.getLimitValue()) ||
(Config.mode === "custom" &&
CustomText.getLimitMode() === "section" &&
sectionIndex < CustomText.getLimitValue()) ||
(Config.mode === "words" && wordIndex < Config.words)
) {
continueRandomGeneration = true;