diff --git a/public/js/script.js b/public/js/script.js index d41eec4b1..8518add22 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -2037,6 +2037,7 @@ function toggleResultWordsDisplay() { async function loadWordsHistory() { $("#words").empty(); inputHistory.forEach((input, index) => { + if (input === "") return; let wordEl = `
`; if (input !== wordsList[index]) { wordEl = `
`; @@ -2058,7 +2059,7 @@ async function loadWordsHistory() { wordEl += '' + wordsList[index][c] + ""; } else { - if (input === currentInput) { + if (input[c] === currentInput || input[c] === undefined) { wordEl += "" + wordsList[index][c] + ""; } else { wordEl +=