From f59cdbd57435917924d8642ccc20db9450f671aa Mon Sep 17 00:00:00 2001 From: Alberto Xamin Date: Tue, 24 Nov 2020 22:41:54 +0100 Subject: [PATCH] fix blank username --- frontend/src/App.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index a3e4aab..a6fc2a5 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -98,9 +98,11 @@ export default { }, methods: { setUsername(e){ - this.didSetUsername = true - this.$socket.emit('set_username', this.username) - e.preventDefault(); + if (this.username.trim().length > 0){ + this.didSetUsername = true + this.$socket.emit('set_username', this.username) + e.preventDefault(); + } }, getLobbyCard(lobby) { return {