This commit is contained in:
Aleksandr Zaitsev 2024-07-21 21:23:24 +03:00
parent f53a0e2847
commit e9d7b365cc

View File

@ -13,7 +13,7 @@ export const useWebsocketStore = defineStore("websocket", {
const player = usePlayerStore()
const game = useGameStore()
console.log(game.owner, game.opponent.id, player.id)
if (game.owner == player.id || game.opponent.id == player.id) {
if (window.location.pathname != '/lobby/' + game.id && (game.owner == player.id || game.opponent.id == player.id)) {
window.location.href = window.location.origin + '/lobby/' + game.id
return
}