X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FHall.vue;h=db483e1d15618f3d9194f76f61ded6e9451adde6;hp=224d5d21764022b054e441cdb32b90b8402d1670;hb=7c4601d007042510ea2aad95a081d6fe83aab938;hpb=8899888e08a54dd3014693bc239f4cec7ddc26d7 diff --git a/client/src/views/Hall.vue b/client/src/views/Hall.vue index 224d5d21..db483e1d 100644 --- a/client/src/views/Hall.vue +++ b/client/src/views/Hall.vue @@ -1095,7 +1095,9 @@ export default { } for (const select of this.newchallenge.V.Options.select || []) { const elt = document.getElementById(select.variable + "_opt"); - chall.options[select.variable] = parseInt(elt.value, 10) || elt.value; + const tryIntVal = parseInt(elt.value, 10); + chall.options[select.variable] = + (isNaN(tryIntVal) ? elt.value : tryIntVal); } error = checkChallenge(chall); if (error) {