File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import * as TestState from "./test-state";
77import * as Numbers from "@monkeytype/util/numbers" ;
88import { CompletedEvent , IncompleteTest } from "@monkeytype/schemas/results" ;
99import { isFunboxActiveWithProperty } from "./funbox/list" ;
10+ import * as CustomText from "./custom-text" ;
1011
1112type CharCount = {
1213 spaces : number ;
@@ -343,7 +344,11 @@ function countChars(): CharCount {
343344 }
344345 correctChars += toAdd . correct ;
345346 incorrectChars += toAdd . incorrect ;
346- if ( i === inputWords . length - 1 && Config . mode === "time" ) {
347+ if (
348+ i === inputWords . length - 1 &&
349+ ( Config . mode === "time" ||
350+ ( Config . mode === "custom" && CustomText . getLimit ( ) . mode === "time" ) )
351+ ) {
347352 //last word - check if it was all correct - add to correct word chars
348353 if ( toAdd . incorrect === 0 ) correctWordChars += toAdd . correct ;
349354 } else {
You can’t perform that action at this time.
0 commit comments