From: Benjamin Auder Date: Wed, 14 Apr 2021 21:15:09 +0000 (+0200) Subject: Fix randomness bug when sending multiple challenges X-Git-Url: https://git.auder.net/%7B%7B%20asset%28%27mixstore/images/assets/doc/html/packages.html?a=commitdiff_plain;h=ce37466ee16c39bf19832524793a23d40915de93;p=vchess.git Fix randomness bug when sending multiple challenges --- diff --git a/client/src/views/Hall.vue b/client/src/views/Hall.vue index 98c52c5d..c3c81282 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"); @@ -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) => {