From 8f4e861c970b09783b101a767f642f4afd94f90b Mon Sep 17 00:00:00 2001 From: Benjamin Auder Date: Fri, 6 Mar 2020 14:40:53 +0100 Subject: [PATCH] Small fix --- client/src/components/ChallengeList.vue | 6 +++++- client/src/views/Game.vue | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/client/src/components/ChallengeList.vue b/client/src/components/ChallengeList.vue index 7572ede1..5a3db5c5 100644 --- a/client/src/components/ChallengeList.vue +++ b/client/src/components/ChallengeList.vue @@ -37,8 +37,12 @@ export default { let augmentedChalls = this.challenges.map(c => { let priority = 0; if (!!c.to && c.to == this.st.user.name) priority = 1; - else if (c.from.sid == this.st.user.sid || c.from.id == this.st.user.id) + else if ( + c.from.sid == this.st.user.sid || + (c.from.id > 0 && c.from.id == this.st.user.id) + ) { priority = 2; + } if (c.added < minAdded) minAdded = c.added; if (c.added > maxAdded) maxAdded = c.added; return Object.assign({}, c, { priority: priority }); diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue index 9bca38ee..edeb18f3 100644 --- a/client/src/views/Game.vue +++ b/client/src/views/Game.vue @@ -246,7 +246,7 @@ export default { notifyTurn: function(sid) { const player = this.people[sid]; const colorIdx = this.game.players.findIndex( - p => p.sid == sid || p.id == player.id); + p => p.sid == sid || p.uid == player.id); const color = ["w","b"][colorIdx]; const movesCount = this.game.moves.length; const yourTurn = -- 2.44.0