A few fixes, drop planned problems support (replaced by forum + mode analyze)
[vchess.git] / client / src / components / GameList.vue
index 8481048..2b7f657 100644 (file)
@@ -8,8 +8,8 @@ table
     th(v-if="showResult") Result
   tr(v-for="g in games" @click="$emit('show-game',g)")
     td {{ g.vname }}
-    td {{ g.players[0] }}
-    td {{ g.players[1] }}
+    td {{ g.players[0].name || "@nonymous" }}
+    td {{ g.players[1].name || "@nonymous" }}
     td {{ g.timeControl }}
     td(v-if="showResult") {{ g.score }}
 </template>
@@ -20,7 +20,7 @@ export default {
        props: ["games"],
        computed: {
                showResult: function() {
-                       return this.games.length > 0 && this.games[0].score != "*";
+                       return this.games.some(g => g.score != "*");
                },
        },
 };