From: Laurent Mazet Date: Sat, 22 Aug 2026 16:57:39 +0000 (+0200) Subject: avoid comfirmation if all rack are empty X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=07a51b63d9e62ea28510bf1efacf508623f3e97c;p=trivabble.git avoid comfirmation if all rack are empty --- diff --git a/public/trivabble.js b/public/trivabble.js index 5fe3b9a..bc376a0 100644 --- a/public/trivabble.js +++ b/public/trivabble.js @@ -2194,12 +2194,16 @@ } function askShowBag() { - myConfirm( - _("Do you really want to see bag content? It's kind of cheating!"), - function () { - sendCmds([{cmd: "showBag"}]); - } - ); + if (nbTilesInRacks) { + myConfirm( + _("Do you really want to see bag content? It's kind of cheating!"), + function () { + sendCmds([{cmd: "showBag"}]); + } + ); + } else { + sendCmds([{cmd: "showBag"}]); + } } function triggerFlashLight(cell) {