mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-04 18:53:26 +08:00
fix(words generator): infinite custom text tests not working correctly
This commit is contained in:
parent
39dd905b47
commit
95f5e6c427
1 changed files with 3 additions and 6 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue