X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FGame.vue;h=df6930cb0774698014f9f9d211918175d6f9fe46;hp=214f81964582264d6c57ad072bc1241df2bd1146;hb=0a17525eeb101d538d334c2208eb8ee44cda1883;hpb=620a88ede2ad25e66d9cbb521388ee53e4a564c0 diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue index 214f8196..df6930cb 100644 --- a/client/src/views/Game.vue +++ b/client/src/views/Game.vue @@ -232,12 +232,10 @@ export default { isConnected: function(index) { const player = this.game.players[index]; // Is it me ? - if ( - (this.st.user.sid == player.sid || this.st.user.id == player.uid) && - (!this.st.user.name || this.st.user.name == player.name) - ) { - return true; - } + if (this.st.user.sid == player.sid || this.st.user.id == player.uid) + // Still have to check for name (because of potential multi-accounts + // on same browser, although this should be rare...) + return (!this.st.user.name || this.st.user.name == player.name); // Try to find a match in people: return ( (