Fix games rendering
authorBenjamin Auder <benjamin.auder@somewhere>
Thu, 12 Mar 2020 16:33:54 +0000 (17:33 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Thu, 12 Mar 2020 16:33:54 +0000 (17:33 +0100)
client/src/views/Game.vue

index 6282680..18a2836 100644 (file)
@@ -1041,11 +1041,8 @@ export default {
           },
           game,
         );
-        if (this.gameIsLoading)
-          // Re-load game because we missed some moves:
-          // artificially reset BaseGame (required if moves arrived in wrong order)
-          this.$refs["basegame"].re_setVariables();
-        else {
+        this.$refs["basegame"].re_setVariables(this.game);
+        if (!this.gameIsLoading) {
           // Initial loading:
           this.gotMoveIdx = game.moves.length - 1;
           // If we arrive here after 'nextGame' action, the board might be hidden