From 327651ee6ecbd4beed4fc3b3aeb6b98bd2c43a0a Mon Sep 17 00:00:00 2001 From: Greg Gauthier Date: Wed, 3 Jul 2024 11:30:41 +0100 Subject: [PATCH] fix formatting of dice mnemonics --- web/encounter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/encounter.js b/web/encounter.js index 940758a..c681e42 100644 --- a/web/encounter.js +++ b/web/encounter.js @@ -57,7 +57,7 @@ document.getElementById('terrainForm').addEventListener('submit', function (even function formatDiceMnemonic(data) { return Array.isArray(data) ? - data[0] + "d" + data[1] + (data[2] === 0 ? "" : "+" + data[2]) : + data[0] + "d" + data[1] + (data[2] === 0 ? "" : (data[2] > 0 ? "+" : "") + data[2]) : data.toString(); }