fix(word generation): plus n funboxes causing custom tests to go over the limit

This commit is contained in:
Miodec 2024-04-24 14:57:41 +02:00
parent 99cc7042ea
commit 42aa055eb4

View file

@ -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 ||
@ -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;
}