From 8532c5750fdc8f615260b62af2383c355a573283 Mon Sep 17 00:00:00 2001 From: Tim van Veenendaal Date: Tue, 6 Jul 2021 18:03:06 +0200 Subject: [PATCH] Add error when game code is empty --- src/views/Home.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/views/Home.vue b/src/views/Home.vue index f6d7c72..a398697 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -31,7 +31,7 @@ The game has started, lets go! - + @@ -77,6 +77,10 @@ export default class Home extends Vue { } 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) => { this.playerId = response.player.id;