Add error when game code is empty
This commit is contained in:
parent
9fbdd98bc6
commit
8532c5750f
@ -77,6 +77,10 @@ export default class Home extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private joinGame() {
|
private joinGame() {
|
||||||
|
if (this.code === '') {
|
||||||
|
this.error = "Game code cannot be empty when joining a game";
|
||||||
|
return;
|
||||||
|
}
|
||||||
PerudoApi.instance.joinGame(this.name, this.code).then((response: JoinCreateGameObject) => {
|
PerudoApi.instance.joinGame(this.name, this.code).then((response: JoinCreateGameObject) => {
|
||||||
this.playerId = response.player.id;
|
this.playerId = response.player.id;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user