From 2dbd7afa1008106b4ff1bce7844ca2c641033f36 Mon Sep 17 00:00:00 2001 From: Nad Alaba <37968805+NadAlaba@users.noreply.github.com> Date: Fri, 5 Apr 2024 13:19:04 +0300 Subject: [PATCH] fix(indicate typos): undefined hints in stop on letter (#5281) --- frontend/src/ts/test/test-ui.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/ts/test/test-ui.ts b/frontend/src/ts/test/test-ui.ts index cb8813e4123c..18eb88a524e9 100644 --- a/frontend/src/ts/test/test-ui.ts +++ b/frontend/src/ts/test/test-ui.ts @@ -35,7 +35,8 @@ async function gethtml2canvas(): Promise { function createHintsHtml( incorrectLtrIndices: number[][], - activeWordLetters: NodeListOf + activeWordLetters: NodeListOf, + inputWord: string ): string { let hintsHtml = ""; for (const adjacentLetters of incorrectLtrIndices) { @@ -43,7 +44,7 @@ function createHintsHtml( const blockLeft = (activeWordLetters[indx] as HTMLElement).offsetLeft; const blockWidth = (activeWordLetters[indx] as HTMLElement).offsetWidth; const blockIndices = `[${indx}]`; - const blockChars = TestInput.input.current[indx]; + const blockChars = inputWord[indx]; hintsHtml += `