Skip to content

Commit

Permalink
Fix issue - was matching words<->clues instead of clues<->clues
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnSmith-LT committed May 4, 2022
1 parent 5222606 commit b028f36
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -1315,14 +1315,14 @@

document.getElementById(coordinates[coor]).readOnly = true;
}
var incorrectWords = [];
incorrectIndices.forEach(function(index){ incorrectWords.push(words_in[index]);});
var incorrectClues = [];
incorrectIndices.forEach(function(index){ incorrectClues.push(x_getAriaText(clues_in[index]).trim());});
$(".li-clue > p").each(function(index, element){
var word = $(element).text();
if (incorrectWords.indexOf(word) !== -1) {
var clue = x_getAriaText($(element).text()).trim();
if (incorrectClues.indexOf(clue) !== -1) {
$(element).addClass("incorrect");
}
else if (word.length>0) {
else if (clue.length>0) {
$(element).addClass("correct");
}
});
Expand Down

0 comments on commit b028f36

Please sign in to comment.