X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FHall.vue;h=bdb280509ff9a7a991a09f6e201cfba9d5ac0e25;hb=c55f90a29815f68dc24a912370db8f6ff9360f8e;hp=98c52c5da1e7747d898201918fdc20d319ebd276;hpb=0cd10065df59cffb1d0b913b809a61b521f7f993;p=vchess.git diff --git a/client/src/views/Hall.vue b/client/src/views/Hall.vue index 98c52c5d..bdb28050 100644 --- a/client/src/views/Hall.vue +++ b/client/src/views/Hall.vue @@ -1096,7 +1096,7 @@ export default { return; } window.V = this.newchallenge.V; - let chall = Object.assign({ options: {} }, this.newchallenge); + let chall = Object.assign({}, this.newchallenge, { options: {} }); // Get/set options variables (if any) / TODO: v-model?! for (const check of this.newchallenge.V.Options.check || []) { const elt = document.getElementById(check.variable + "_opt"); @@ -1134,7 +1134,7 @@ export default { alert(this.st.tr["Challenge already exists"]); return; } - if (this.newchallenge.memorize) this.addPresetChall(this.newchallenge); + if (this.newchallenge.memorize) this.addPresetChall(chall); delete chall["V"]; delete chall["diag"]; const finishAddChallenge = cid => { @@ -1216,8 +1216,10 @@ export default { "POST", { data: { - chall: Object.assign({}, - chall, { options: JSON.stringify(chall.options) } + chall: Object.assign( + {}, + chall, + { options: JSON.stringify(chall.options) } ) }, success: (response) => {