fix(word generator): repeated tests sometimes triggering generation error

This commit is contained in:
Miodec 2024-07-03 12:17:33 +02:00
parent ea650278ea
commit 03937c72cd

View file

@ -738,7 +738,11 @@ export async function getNextWord(
if (
Config.mode === "time" ||
(Config.mode === "custom" && CustomText.getLimitMode() === "time")
(Config.mode === "custom" && CustomText.getLimitMode() === "time") ||
(Config.mode === "custom" &&
CustomText.getLimitMode() === "word" &&
wordIndex < CustomText.getLimitValue()) ||
(Config.mode === "words" && wordIndex < Config.words)
) {
continueRandomGeneration = true;
}