Skip to content

Commit c2cee8b

Browse files
committed
impr: always count correct partially completed words for wpm
1 parent 55bbedb commit c2cee8b

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

frontend/src/ts/test/test-stats.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import * as TestState from "./test-state";
77
import * as Numbers from "@monkeytype/util/numbers";
88
import { CompletedEvent, IncompleteTest } from "@monkeytype/schemas/results";
99
import { isFunboxActiveWithProperty } from "./funbox/list";
10-
import * as CustomText from "./custom-text";
1110

1211
type CharCount = {
1312
spaces: number;
@@ -344,11 +343,7 @@ function countChars(): CharCount {
344343
}
345344
correctChars += toAdd.correct;
346345
incorrectChars += toAdd.incorrect;
347-
if (
348-
i === inputWords.length - 1 &&
349-
(Config.mode === "time" ||
350-
(Config.mode === "custom" && CustomText.getLimit().mode === "time"))
351-
) {
346+
if (i === inputWords.length - 1) {
352347
//last word - check if it was all correct - add to correct word chars
353348
if (toAdd.incorrect === 0) correctWordChars += toAdd.correct;
354349
} else {

0 commit comments

Comments
 (0)