From ec5461779167f90fa183fecede6f0f6714ef623c Mon Sep 17 00:00:00 2001 From: Haoqing Xu Date: Tue, 7 Nov 2023 17:38:23 +0800 Subject: [PATCH] bug(DiceTool): Ignore 'GO' button if no input was given --- CHANGELOG.md | 1 + client/src/game/ui/tools/DiceTool.vue | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 106045fdd..09ce05f4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ tech changes will usually be stripped from release notes for the public - Polygon edit UI: was not taking rotation of shape into account - Teleport: shapes would not be removed on the old location until a refresh +- Dice tool: would not send zero results when dice list is empty ## [2023.3.0] - 2023-09-17 diff --git a/client/src/game/ui/tools/DiceTool.vue b/client/src/game/ui/tools/DiceTool.vue index 47fbaba8c..1cff4a919 100644 --- a/client/src/game/ui/tools/DiceTool.vue +++ b/client/src/game/ui/tools/DiceTool.vue @@ -63,6 +63,9 @@ async function reroll(roll: string): Promise { } async function go(): Promise { + if (diceArray.value.length === 0) { + return; + } clearTimeout(timeout); button.value?.classList.remove("transition"); const roll = diceText.value;