Some (experimental) fixes
[vchess.git] / client / src / components / ChallengeList.vue
index 7316c26..a1c46cd 100644 (file)
@@ -62,11 +62,14 @@ export default {
         return c.to || this.st.tr["Any player"];
       return c.from.name || "@nonymous";
     },
+    // TODO: duplicated from Hall
     getRandomnessClass: function(c) {
-      if (!Number.isInteger(c.options.randomness)) return {};
-      return {
-        ["random-" + c.options.randomness]: true
-      };
+      const opts = c.options;
+      if (opts.randomness === undefined && opts.random === undefined)
+        return {};
+      if (opts.randomness !== undefined)
+        return { ["random-" + opts.randomness]: true };
+      return { ["random-" + (opts.random ? 2 : 0)]: true };
     }
   }
 };