Skip to content

Commit

Permalink
fix(word generation): plus n funboxes causing custom tests to go over…
Browse files Browse the repository at this point in the history
… the limit
  • Loading branch information
Miodec committed Apr 24, 2024
1 parent 99cc704 commit 42aa055
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions frontend/src/ts/test/words-generator.ts
Expand Up @@ -403,6 +403,8 @@ export function getWordsLimit(): number {
if (Config.mode === "words" && Config.words === 0) {
limit = 100;
}

//custom
if (Config.mode === "custom") {
if (
CustomText.getLimitValue() === 0 ||
Expand All @@ -426,6 +428,14 @@ export function getWordsLimit(): number {
limit = Config.words;
}

if (
Config.mode === "custom" &&
CustomText.getLimitMode() === "word" &&
CustomText.getLimitValue() < limit
) {
limit = CustomText.getLimitValue();
}

return limit;
}

Expand Down

0 comments on commit 42aa055

Please sign in to comment.