correct in row checking
authorLaurent Mazet <mazet@softndesign.org>
Sun, 28 Jun 2020 14:21:26 +0000 (16:21 +0200)
committerLaurent Mazet <mazet@softndesign.org>
Sun, 28 Jun 2020 14:21:26 +0000 (16:21 +0200)
public/trivabble.js

index 2e4888d08e865c17ca2bb2209cde66f60cf63ce5..94c83274e94e56d18f3ecd35cf103c86f8ad536c 100644 (file)
 
             /* Look for word in row */
             const newWordInRow = searchWordInLine(row, col, 0, 1);
-            if ((newWordInRow !== null) &&  (!words.find(element => element.letters === newWordInCol.letters))) {
+            if ((newWordInRow !== null) &&  (!words.find(element => element.letters === newWordInRow.letters))) {
                 words.push(newWordInRow);
             }