mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-12-26 18:09:40 +08:00
use new resolve type
This commit is contained in:
parent
38e1e27f58
commit
76698c77b8
1 changed files with 11 additions and 1 deletions
|
|
@ -18,7 +18,17 @@ export function update(): void {
|
|||
|
||||
for (const [userId, user] of Object.entries(room.users)) {
|
||||
if (userId === tribeSocket.getId()) continue;
|
||||
if (user.result?.resolve.afk || user.result?.resolve.failed) continue;
|
||||
|
||||
const res = user.result;
|
||||
|
||||
if (res === undefined) continue;
|
||||
|
||||
if (
|
||||
("valid" in res.resolve && !res.resolve.valid) ||
|
||||
("failed" in res.resolve && res.resolve.failed)
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
if ((user?.progress?.wpm ?? 0) > maxWpm) maxWpm = user?.progress?.wpm ?? 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue