mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-18 11:36:13 +08:00
impr: always count correct partially completed words for wpm
This commit is contained in:
parent
55bbedbcc3
commit
c2cee8bdee
1 changed files with 1 additions and 6 deletions
|
@ -7,7 +7,6 @@ import * as TestState from "./test-state";
|
|||
import * as Numbers from "@monkeytype/util/numbers";
|
||||
import { CompletedEvent, IncompleteTest } from "@monkeytype/schemas/results";
|
||||
import { isFunboxActiveWithProperty } from "./funbox/list";
|
||||
import * as CustomText from "./custom-text";
|
||||
|
||||
type CharCount = {
|
||||
spaces: number;
|
||||
|
@ -344,11 +343,7 @@ function countChars(): CharCount {
|
|||
}
|
||||
correctChars += toAdd.correct;
|
||||
incorrectChars += toAdd.incorrect;
|
||||
if (
|
||||
i === inputWords.length - 1 &&
|
||||
(Config.mode === "time" ||
|
||||
(Config.mode === "custom" && CustomText.getLimit().mode === "time"))
|
||||
) {
|
||||
if (i === inputWords.length - 1) {
|
||||
//last word - check if it was all correct - add to correct word chars
|
||||
if (toAdd.incorrect === 0) correctWordChars += toAdd.correct;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue