From f11fa277986fd6a6469bd45e4dd81ba2d424d6ba Mon Sep 17 00:00:00 2001
From: Alex <atm2g19@soton.ac.uk>
Date: Sat, 4 Apr 2020 22:49:35 +0100
Subject: [PATCH] game prompt exit cancels creation

---
 public/games/game_loader.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/public/games/game_loader.js b/public/games/game_loader.js
index 9b6ed84..bd6e22c 100644
--- a/public/games/game_loader.js
+++ b/public/games/game_loader.js
@@ -75,6 +75,7 @@ function joinGame(){
 function createGame(){
 
     let name = prompt("Please enter game name", "name");
+    if(name == null) return;
     let password = prompt("Enter password, \nor leave blank for open game.");
     let data = {
         name : name,
-- 
GitLab