better score check
authorLaurent Mazet <mazet@softndesign.org>
Tue, 24 Nov 2020 12:26:52 +0000 (13:26 +0100)
committerLaurent Mazet <mazet@softndesign.org>
Tue, 24 Nov 2020 12:26:52 +0000 (13:26 +0100)
public/trivabble.js

index 3ca0cfd36a2a3ba8797b4ee98d36222b5f8fb794..e25ae58e03aef823240ed35631b14cd9be4164c9 100644 (file)
 
             if (Object.prototype.hasOwnProperty.call(player, "score")) {
                 const scoreCell = getScoreCell(playerName);
-                if (scoreCell.textContent != player.score) {
+                if (parseInt(scoreCell.textContent) !== player.score) {
                     currentTilePlayed = {};
                 }
                 scoreCell.textContent = player.score;