From 95f5e6c427091304bc1794dfdc9b9eab6c49b58d Mon Sep 17 00:00:00 2001 From: Miodec Date: Wed, 8 May 2024 12:43:55 +0200 Subject: [PATCH] fix(words generator): infinite custom text tests not working correctly --- frontend/src/ts/test/words-generator.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/frontend/src/ts/test/words-generator.ts b/frontend/src/ts/test/words-generator.ts index 90b7e365fa71..0d5a10dee67a 100644 --- a/frontend/src/ts/test/words-generator.ts +++ b/frontend/src/ts/test/words-generator.ts @@ -417,11 +417,7 @@ export function getWordsLimit(): number { //custom if (Config.mode === "custom") { - if ( - CustomText.getLimitValue() === 0 || - CustomText.getLimitMode() === "time" || - CustomText.getLimitMode() === "section" - ) { + if (CustomText.getLimitValue() === 0) { limit = 100; } else { limit = @@ -446,7 +442,8 @@ export function getWordsLimit(): number { if ( Config.mode === "custom" && CustomText.getLimitMode() === "word" && - CustomText.getLimitValue() < limit + CustomText.getLimitValue() < limit && + CustomText.getLimitValue() !== 0 ) { limit = CustomText.getLimitValue(); }