X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FHall.vue;h=05ee05b5debc20f92ada66bf28fe82457772dadc;hb=bcc745f8339186cb7bdbfb4be72c457a2a373bff;hp=c9a15eaa4430a38c552cd4021d46aefa6e7a0dc6;hpb=3d9745ae10ba867e4c1ec6e848db29c5e293420b;p=vchess.git diff --git a/client/src/views/Hall.vue b/client/src/views/Hall.vue index c9a15eaa..05ee05b5 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 (!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 }; @@ -1397,7 +1403,8 @@ export default { moves: [], clocks: [-1, -1], //-1 = unstarted chats: [], - score: "*" + score: "*", + options: JSON.stringify(gameInfo.options) } ); setTimeout(