From 2eca7311a1f02285ec875be35cf73b32bdd3b73c Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Thu, 8 Apr 2021 22:33:46 +0200
Subject: [PATCH] Adjustments

---
 client/src/components/ChallengeList.vue | 8 +++++++-
 client/src/views/Hall.vue               | 8 +++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/client/src/components/ChallengeList.vue b/client/src/components/ChallengeList.vue
index 7316c266..21179a65 100644
--- a/client/src/components/ChallengeList.vue
+++ b/client/src/components/ChallengeList.vue
@@ -63,7 +63,13 @@ export default {
       return c.from.name || "@nonymous";
     },
     getRandomnessClass: function(c) {
-      if (!Number.isInteger(c.options.randomness)) return {};
+      if (
+        // TODO: one extra test here
+        !Number.isInteger(c.options.randomness) &&
+        !parseInt(c.options.randomness, 10)
+      ) {
+        return {};
+      }
       return {
         ["random-" + c.options.randomness]: true
       };
diff --git a/client/src/views/Hall.vue b/client/src/views/Hall.vue
index 091c7154..f3c421e6 100644
--- a/client/src/views/Hall.vue
+++ b/client/src/views/Hall.vue
@@ -479,7 +479,13 @@ export default {
       this.conn = null;
     },
     getRandomnessClass: function(pc) {
-      if (!Number.isInteger(pc.options.randomness)) return {};
+      if (
+        // TODO: one extra test here
+        !Number.isInteger(pc.options.randomness) &&
+        !parseInt(pc.options.randomness, 10)
+      ) {
+        return {};
+      }
       return {
         ["random-" + pc.options.randomness]: true
       };
-- 
2.44.0