0
0
Fork 0

Prevent chances from sticking around when the weight is removed

This commit is contained in:
Oliver-Akins 2023-02-01 21:02:21 -06:00
parent 80d85e057e
commit 60ecfb190c

7
app.js
View file

@ -46,9 +46,10 @@ const app = new Vue({
updateChanceValues() { updateChanceValues() {
for (const opt of this.options) { for (const opt of this.options) {
if (!opt.weight) { if (!opt.weight) {
continue opt.chance = ``;
} } else {
opt.chance = Math.round(opt.weight / this.totalWeight * 100 ); opt.chance = Math.round(opt.weight / this.totalWeight * 100 );
};
}; };
}, },
}, },