From: Benjamin Auder Date: Thu, 8 Apr 2021 20:33:46 +0000 (+0200) Subject: Adjustments X-Git-Url: https://git.auder.net/css/vendor/img/scripts/getGraph_%22%20%20%20this.image%20%20%20%22.php?a=commitdiff_plain;h=2eca7311a1f02285ec875be35cf73b32bdd3b73c;p=vchess.git Adjustments --- 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 };