Skip to content

Commit 0bc380f

Browse files
committed
fix(word generation): test sometimes stopping in a repeated practice words test
1 parent b0e7e2e commit 0bc380f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

frontend/src/ts/test/test-logic.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,10 @@ export async function addWord(): Promise<void> {
656656
e,
657657
"Error while getting next word. Please try again later"
658658
),
659-
-1
659+
-1,
660+
{
661+
important: true,
662+
}
660663
);
661664
}
662665
}

frontend/src/ts/test/words-generator.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,9 @@ export async function getNextWord(
749749
(Config.mode === "custom" &&
750750
CustomText.getLimitMode() === "word" &&
751751
wordIndex < CustomText.getLimitValue()) ||
752+
(Config.mode === "custom" &&
753+
CustomText.getLimitMode() === "section" &&
754+
sectionIndex < CustomText.getLimitValue()) ||
752755
(Config.mode === "words" && wordIndex < Config.words)
753756
) {
754757
continueRandomGeneration = true;

0 commit comments

Comments
 (0)