fixed bug with exit from page crash

This commit is contained in:
Kostya
2024-02-04 20:08:22 +03:00
parent 7a53fbb765
commit 3be3fd6104

View File

@@ -116,6 +116,14 @@ export default {
if (this.crashObject.Status === 'GameEnd' && this.crashObject.Players.some(player => player.UserName === GetCookie('SpUserName'))) { if (this.crashObject.Status === 'GameEnd' && this.crashObject.Players.some(player => player.UserName === GetCookie('SpUserName'))) {
this.startGame = false this.startGame = false
} }
if (
this.crashObject.Players.some(player => player.UserName === GetCookie('SpUserName')) &&
this.startGame === false &&
this.crashObject.Status !== 'GameEnd' &&
this.crashObject.Players.some(player => player.UserGameState !== 'Win')
) {
this.startGame = true;
}
}) })
}, },
validations() { validations() {