Prevent chances from sticking around when the weight is removed
This commit is contained in:
parent
80d85e057e
commit
60ecfb190c
1 changed files with 4 additions and 3 deletions
7
app.js
7
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 );
|
||||
};
|
||||
};
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue