Fix #84 Parse floats and add info for chance list

This commit is contained in:
Misode
2020-06-01 01:09:42 +02:00
parent b6eba92e64
commit 073cdd2af1
5 changed files with 5 additions and 0 deletions

View File

@@ -372,6 +372,7 @@ function updateField(el) {
for (let i = 0; i < value.length; i += 1) {
value[i] = value[i].trim();
if (type === 'chance-list') {
value[i] = parseFloat(value[i]);
if (isNaN(value[i])) {
value = [];
break;