Fix issues with preset challenges
authorBenjamin Auder <benjamin.auder@somewhere>
Wed, 11 Mar 2020 12:54:03 +0000 (13:54 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Wed, 11 Mar 2020 12:54:03 +0000 (13:54 +0100)
client/src/views/Hall.vue

index 829e5b7..32d5963 100644 (file)
@@ -845,8 +845,7 @@ export default {
       const vModule = await import("@/variants/" + vname + ".js");
       this.newchallenge.V = vModule.VariantRules;
       this.newchallenge.vname = vname;
-      if (!!cb)
-        cb();
+      if (!!cb) cb();
     },
     trySetNewchallDiag: function() {
       if (!this.newchallenge.fen) {
@@ -872,7 +871,7 @@ export default {
       this.newchallenge.vid = pchall.vid;
       this.newchallenge.cadence = pchall.cadence;
       this.newchallenge.randomness = pchall.randomness;
-      this.issueNewChallenge();
+      this.loadNewchallVariant(this.issueNewChallenge);
     },
     issueNewChallenge: async function() {
       if (!!(this.newchallenge.cadence.match(/^[0-9]+$/)))