Add temporary patch for preset challenges
[vchess.git] / client / src / views / Hall.vue
index 6d675a1..1bd5987 100644 (file)
@@ -300,6 +300,10 @@ export default {
     }
   },
   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);