Skip to content

Commit

Permalink
fix(words generator): infinite custom text tests not working correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Miodec committed May 8, 2024
1 parent 39dd905 commit 95f5e6c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions frontend/src/ts/test/words-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -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();
}
Expand Down

0 comments on commit 95f5e6c

Please sign in to comment.