diff --git a/frontend/src/App.vue b/frontend/src/App.vue index df07892..3de9eb3 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -39,7 +39,10 @@ export default { }, room(data) { this.isInLobby = true; - this.$router.push({path:'game', query: { code: data.name, pwd: data.password }}) + if (data.password) + this.$router.replace({path:'game', query: { code: data.name, pwd: data.password }}) + else + this.$router.replace({path:'game', query: { code: data.name }}) }, }, methods: { diff --git a/frontend/src/components/Lobby.vue b/frontend/src/components/Lobby.vue index 3633532..7f01be0 100644 --- a/frontend/src/components/Lobby.vue +++ b/frontend/src/components/Lobby.vue @@ -137,7 +137,7 @@ export default { }, computed: { inviteLink() { - return `${window.location.origin}/game?code=${this.lobbyName}&pwd=${this.password}` + return `${window.location.origin}/game?code=${this.lobbyName}${this.password?`&pwd=${this.password}`:''}` }, expansionsStatus() { return this.togglable_expansions.map(x=>{