diff options
Diffstat (limited to 'public')
-rw-r--r-- | public/join.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/public/join.js b/public/join.js index cc8d325..185aa6c 100644 --- a/public/join.js +++ b/public/join.js @@ -46,8 +46,10 @@ function accept(role) { function send_invite() { let invite_user = document.getElementById("invite_user").value - post(`/invite/${game.game_id}/${encodeURIComponent(invite_role)}/${encodeURIComponent(invite_user)}`) - document.getElementById("invite").close() + if (invite_user) { + post(`/invite/${game.game_id}/${encodeURIComponent(invite_role)}/${encodeURIComponent(invite_user)}`) + document.getElementById("invite").close() + } } function show_invite(role) { |