scroll to game beginning: better fix
[vchess.git] / client / src / views / Game.vue
index 5c4630b..df6930c 100644 (file)
@@ -233,7 +233,9 @@ export default {
       const player = this.game.players[index];
       // Is it me ?
       if (this.st.user.sid == player.sid || this.st.user.id == player.uid)
-        return true;
+        // 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 (
         (