mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-28 16:54:04 +08:00
fixed the 420 words 10 unlock not working
This commit is contained in:
parent
8399cbab11
commit
b5a08bd96e
2 changed files with 19 additions and 3 deletions
|
@ -592,10 +592,18 @@ function updateOther(
|
|||
if (TestStats.invalid) {
|
||||
otherText += "<br>invalid";
|
||||
const extra: string[] = [];
|
||||
if (result.wpm < 0 || result.wpm > 350) {
|
||||
if (
|
||||
result.wpm < 0 ||
|
||||
(result.wpm > 350 && result.mode != "words" && result.mode2 != "10") ||
|
||||
(result.wpm > 420 && result.mode == "words" && result.mode2 == "10")
|
||||
) {
|
||||
extra.push("wpm");
|
||||
}
|
||||
if (result.rawWpm < 0 || result.rawWpm > 350) {
|
||||
if (
|
||||
result.rawWpm < 0 ||
|
||||
(result.rawWpm > 350 && result.mode != "words" && result.mode2 != "10") ||
|
||||
(result.rawWpm > 420 && result.mode == "words" && result.mode2 == "10")
|
||||
) {
|
||||
extra.push("raw");
|
||||
}
|
||||
if (result.acc < 75 || result.acc > 100) {
|
||||
|
|
|
@ -1596,7 +1596,15 @@ export async function finish(difficultyFailed = false): Promise<void> {
|
|||
Notifications.add("Test invalid - too short", 0);
|
||||
tooShort = true;
|
||||
dontSave = true;
|
||||
} else if (completedEvent.wpm < 0 || completedEvent.wpm > 350) {
|
||||
} else if (
|
||||
completedEvent.wpm < 0 ||
|
||||
(completedEvent.wpm > 350 &&
|
||||
completedEvent.mode != "words" &&
|
||||
completedEvent.mode2 != "10") ||
|
||||
(completedEvent.wpm > 420 &&
|
||||
completedEvent.mode == "words" &&
|
||||
completedEvent.mode2 == "10")
|
||||
) {
|
||||
Notifications.add("Test invalid - wpm", 0);
|
||||
TestStats.setInvalid();
|
||||
dontSave = true;
|
||||
|
|
Loading…
Reference in a new issue