X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FGame.vue;h=5785abdd481e50d19d0b109af1063b053898e33a;hp=caf8dd8e603d49820b769dc46fabce095dfcacba;hb=059228c9fd737361dc97de69811daed5abbd6254;hpb=d81c26d17a0989788782253903ff9859b442aed1 diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue index caf8dd8e..5785abdd 100644 --- a/client/src/views/Game.vue +++ b/client/src/views/Game.vue @@ -663,8 +663,8 @@ export default { break; } case "resign": - const score = data.side == "b" ? "1-0" : "0-1"; - const side = data.side == "w" ? "White" : "Black"; + const score = (data.data == "b" ? "1-0" : "0-1"); + const side = (data.data == "w" ? "White" : "Black"); this.gameOver(score, side + " surrender"); break; case "abort": @@ -904,8 +904,8 @@ export default { if (!this.game.mycolor || !confirm(this.st.tr["Resign the game?"])) return; this.send("resign", { data: this.game.mycolor }); - const score = this.game.mycolor == "w" ? "0-1" : "1-0"; - const side = this.game.mycolor == "w" ? "White" : "Black"; + const score = (this.game.mycolor == "w" ? "0-1" : "1-0"); + const side = (this.game.mycolor == "w" ? "White" : "Black"); this.gameOver(score, side + " surrender"); }, // 3 cases for loading a game: