projects
/
vchess.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
620a88e
)
Fix isConnected indicator in case of multi-accounts on same browser
author
Benjamin Auder
<benjamin.auder@somewhere>
Fri, 6 Mar 2020 17:37:04 +0000
(18:37 +0100)
committer
Benjamin Auder
<benjamin.auder@somewhere>
Fri, 6 Mar 2020 17:37:04 +0000
(18:37 +0100)
client/src/views/Game.vue
patch
|
blob
|
blame
|
history
diff --git
a/client/src/views/Game.vue
b/client/src/views/Game.vue
index
214f819
..
df6930c
100644
(file)
--- 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 ?
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 (
(
// Try to find a match in people:
return (
(