diff --git a/frontend/src/ts/test/test-ui.ts b/frontend/src/ts/test/test-ui.ts index 9b31bff53..ec28d660a 100644 --- a/frontend/src/ts/test/test-ui.ts +++ b/frontend/src/ts/test/test-ui.ts @@ -1148,19 +1148,23 @@ async function loadWordsHistory(): Promise { ) !== null; let wordEl = ""; try { - if (input === undefined || input === "") + if (input === undefined || input === "") { throw new Error("empty input word"); + } + + const errorClass = input !== word ? "error" : ""; + if (corrected !== undefined && corrected !== "") { const correctedChar = !containsKorean ? corrected : Hangul.assemble(corrected.split("")); - wordEl = `
`; } else { - wordEl = `
`; }