0
0
Fork 0

Fix bug that allowed people to start games when cancelling the name entry.

This commit is contained in:
Oliver-Akins 2021-01-02 18:37:05 -07:00
parent 14cda8a50f
commit 34e1a19a64

View file

@ -23,9 +23,12 @@ export default {
createGame() {
this.name = prompt(`What is your name?`);
// Assert that the user entered a name and didn't cancel
if (this.name) {
this.$socket.client.emit(`CreateGame`, {
name: this.name,
});
};
},
joinGame() {
// Get the user's name