From: Benjamin Auder Date: Thu, 8 Apr 2021 20:20:23 +0000 (+0200) Subject: Adjustments X-Git-Url: https://git.auder.net/doc/html/index.html?a=commitdiff_plain;h=81dd17869116f70db375597b59232fa8cb11a868;p=vchess.git Adjustments --- diff --git a/client/src/components/ChallengeList.vue b/client/src/components/ChallengeList.vue index cf4565ad..7316c266 100644 --- a/client/src/components/ChallengeList.vue +++ b/client/src/components/ChallengeList.vue @@ -48,7 +48,7 @@ export default { } if (c.added < minAdded) minAdded = c.added; if (c.added > maxAdded) maxAdded = c.added; - return Object.assign({}, c, { priority: priority }); + return Object.assign({ priority: priority }, c); }); const deltaAdded = maxAdded - minAdded; return augmentedChalls.sort((c1, c2) => { @@ -63,7 +63,7 @@ export default { return c.from.name || "@nonymous"; }, getRandomnessClass: function(c) { - if (!c.options.randomness) return {}; + if (!Number.isInteger(c.options.randomness)) return {}; return { ["random-" + c.options.randomness]: true }; diff --git a/client/src/views/Hall.vue b/client/src/views/Hall.vue index c9a15eaa..091c7154 100644 --- a/client/src/views/Hall.vue +++ b/client/src/views/Hall.vue @@ -479,7 +479,7 @@ export default { this.conn = null; }, getRandomnessClass: function(pc) { - if (!pc.options.randomness) return {}; + if (!Number.isInteger(pc.options.randomness)) return {}; return { ["random-" + pc.options.randomness]: true };