Attempt to fix opponent in PGN (should be OK now)
[vchess.git] / public / javascripts / components / game.js
index 8e8e277..bd66f73 100644 (file)
@@ -493,10 +493,12 @@ Vue.component('my-game', {
                        this.score = score;
                        let modalBox = document.getElementById("modal-eog");
                        modalBox.checked = true;
-                       setTimeout(() => { modalBox.checked = false; }, 2000);
+                       setTimeout(() => {
+                               modalBox.checked = false;
+                               this.mode = "idle"; //TODO: not the best way... (to see correct opponent in PGN)
+                       }, 2000);
                        if (this.mode == "human")
                                this.clearStorage();
-                       this.mode = "idle";
                        this.oppid = "";
                },
                getEndgameMessage: function(score) {