mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-13 07:23:39 +08:00
fixed infinite tests not saving. closes #1024
This commit is contained in:
parent
a4a58a84c3
commit
929a233324
2 changed files with 8 additions and 4 deletions
|
@ -1362,8 +1362,10 @@ exports.testCompleted = functions.https.onRequest(async (request, response) => {
|
|||
return;
|
||||
}
|
||||
if (
|
||||
(obj.mode === "time" && obj.mode2 < 15) ||
|
||||
(obj.mode === "words" && obj.mode2 < 10) ||
|
||||
(obj.mode === "time" && obj.mode2 < 15 && obj.mode2 > 0) ||
|
||||
(obj.mode === "time" && obj.mode2 == 0 && obj.testDuration < 15) ||
|
||||
(obj.mode === "words" && obj.mode2 < 10 && obj.mode2 > 0) ||
|
||||
(obj.mode === "words" && obj.mode2 == 0 && obj.testDuration < 15) ||
|
||||
(obj.mode === "custom" &&
|
||||
obj.customText !== undefined &&
|
||||
!obj.customText.isWordRandom &&
|
||||
|
|
|
@ -2191,8 +2191,10 @@ function showResult(difficultyFailed = false) {
|
|||
} else if (sameWordset) {
|
||||
Notifications.add("Test invalid - repeated", 0);
|
||||
} else if (
|
||||
(config.mode === "time" && mode2 < 15) ||
|
||||
(config.mode === "words" && mode2 < 10) ||
|
||||
(config.mode === "time" && mode2 < 15 && mode2 > 0) ||
|
||||
(config.mode === "time" && mode2 == 0 && testtime < 15) ||
|
||||
(config.mode === "words" && mode2 < 10 && mode2 > 0) ||
|
||||
(config.mode === "words" && mode2 == 0 && testtime < 15) ||
|
||||
(config.mode === "custom" &&
|
||||
!customText.isWordRandom &&
|
||||
!customText.isTimeRandom &&
|
||||
|
|
Loading…
Reference in a new issue