From a64b46ff90b4cce0812f9b60ae9d734d7d5eb56a Mon Sep 17 00:00:00 2001 From: AlexanderGullen Date: Sun, 15 Mar 2026 12:41:31 -0400 Subject: [PATCH] fix: cannot read properties of null (@alexmgullen) --- frontend/src/ts/test/test-logic.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/ts/test/test-logic.ts b/frontend/src/ts/test/test-logic.ts index 8fd285f25f07..16cb6d268446 100644 --- a/frontend/src/ts/test/test-logic.ts +++ b/frontend/src/ts/test/test-logic.ts @@ -815,13 +815,13 @@ function buildCompletedEvent( const duration = parseFloat(stats.time.toString()); const afkDuration = TestStats.calculateAfkSeconds(duration); + let quoteLength = -1; let language = Config.language; if (Config.mode === "quote") { language = Strings.removeLanguageSize(Config.language); + quoteLength = TestWords.currentQuote?.group ?? quoteLength; } - const quoteLength = TestWords.currentQuote?.group ?? -1; - const completedEvent: Omit = { wpm: stats.wpm, rawWpm: stats.wpmRaw,