From 60ecfb190c48b24ba7189d79adeeb19c93c68d29 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Wed, 1 Feb 2023 21:02:21 -0600 Subject: [PATCH] Prevent chances from sticking around when the weight is removed --- app.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app.js b/app.js index 7ea42f7..529b5ca 100644 --- a/app.js +++ b/app.js @@ -46,9 +46,10 @@ const app = new Vue({ updateChanceValues() { for (const opt of this.options) { if (!opt.weight) { - continue - } - opt.chance = Math.round(opt.weight / this.totalWeight * 100 ); + opt.chance = ``; + } else { + opt.chance = Math.round(opt.weight / this.totalWeight * 100 ); + }; }; }, },