X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FHall.vue;h=f3c421e6c7c8ff5174ffbc2c0a54589d32103be8;hp=1bd5987cb48724bf184f69b78b05b39ba6ce77c1;hb=2eca7311a1f02285ec875be35cf73b32bdd3b73c;hpb=41b3e69acb9195cc106dd018af5fc969ea2d48c0 diff --git a/client/src/views/Hall.vue b/client/src/views/Hall.vue index 1bd5987c..f3c421e6 100644 --- a/client/src/views/Hall.vue +++ b/client/src/views/Hall.vue @@ -14,7 +14,7 @@ main p.text-center span.variantName | {{ curChallToAccept.vname }} - | {{ curChallToAccept.options.abridged }} + | {{ curChallToAccept.options.abridged || '' }} span {{ curChallToAccept.cadence }} span {{ st.tr["with"] + " " + curChallToAccept.from.name }} p.text-center(v-if="!!curChallToAccept.color") @@ -178,7 +178,7 @@ main ) td {{ pc.vname }} td {{ pc.cadence }} - td(:class="getRandomnessClass(pc)") {{ pc.options.abridged }} + td(:class="getRandomnessClass(pc)") {{ pc.options.abridged || '' }} td.remove-preset(@click="removePresetChall($event, pc)") img(src="/images/icons/delete.svg") .row @@ -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 };