From: Laurent Mazet Date: Sat, 9 Aug 2025 15:23:53 +0000 (+0200) Subject: fix currentPlayer and lastPlayer values when playerName is changed X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=d091c45238af03c9287ded2c069c22f595f9d2d9;p=trivabble.git fix currentPlayer and lastPlayer values when playerName is changed --- diff --git a/public/trivabble.js b/public/trivabble.js index 5f53c79..22399cc 100644 --- a/public/trivabble.js +++ b/public/trivabble.js @@ -1141,6 +1141,12 @@ } else { blink(playerNameCell); } + if (currentPlayer === playerName) { + currentPlayer = newName; + } + if (lastPlayer === playerName) { + lastPlayer = newName; + } chatMessage("", format(_("{0} changed their name to {1}"), playerName, newName)); } }