Add temporary patch for preset challenges
authorBenjamin Auder <benjamin.auder@somewhere>
Thu, 8 Apr 2021 19:50:50 +0000 (21:50 +0200)
committerBenjamin Auder <benjamin.auder@somewhere>
Thu, 8 Apr 2021 19:50:50 +0000 (21:50 +0200)
client/src/views/Hall.vue

index 6d675a1..1bd5987 100644 (file)
@@ -300,6 +300,10 @@ export default {
     }
   },
   created: function() {
     }
   },
   created: function() {
+    // TODO: remove this patch soon:
+    this.presetChalls.forEach(pc => {
+      if (!pc.options) pc.options = { randomness: pc.randomness };
+    });
     document.addEventListener('visibilitychange', this.visibilityChange);
     window.addEventListener('focus', this.onFocus);
     window.addEventListener('blur', this.onBlur);
     document.addEventListener('visibilitychange', this.visibilityChange);
     window.addEventListener('focus', this.onFocus);
     window.addEventListener('blur', this.onBlur);