X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FRules.vue;h=c069eb29b073451c2f195354dce7a75dd37a2281;hb=aeba929c6d4e2388f9b16593d6b11b0d7fa5a16e;hp=2edd8a880764e8437047061ccde150bd9e6c4721;hpb=70c9745d34b705eb8a4dc72b6e4655739d31347c;p=vchess.git diff --git a/client/src/views/Rules.vue b/client/src/views/Rules.vue index 2edd8a88..c069eb29 100644 --- a/client/src/views/Rules.vue +++ b/client/src/views/Rules.vue @@ -120,12 +120,16 @@ export default { this.gameInfo.mode = mode; if (this.gameInfo.mode == "versus") { CompgameStorage.get(this.gameInfo.vname, (game) => { - // NOTE: game might be null + // NOTE: game might be null (if none stored yet) + if (!!game && !V.IsGoodFen(game.fen)) { + // Some issues with stored game: delete + CompgameStorage.remove(game.vname); + game = null; + } this.$refs["compgame"].launchGame(game); }); - } else { - this.$refs["compgame"].launchGame(); } + else this.$refs["compgame"].launchGame(); }, // The user wants to stop the game: stopGame: function() {