Fix README, TODO and a mistake in MyGames
[vchess.git] / client / src / views / MyGames.vue
index e843931..bcf7d18 100644 (file)
@@ -102,8 +102,10 @@ export default {
           (rem == 1 && myColor == "b")
         );
       };
           (rem == 1 && myColor == "b")
         );
       };
-      if (game.type == "live" || !isMyTurn(game))
+      if (game.type == "live" || !isMyTurn(game)) {
         this.$router.push("/game/" + game.id);
         this.$router.push("/game/" + game.id);
+        return;
+      }
       // It's my turn in this game. Are there others?
       let nextIds = "";
       let otherCorrGamesMyTurn = this.corrGames.filter(
       // It's my turn in this game. Are there others?
       let nextIds = "";
       let otherCorrGamesMyTurn = this.corrGames.filter(