From 0e3775330268f4e80844cf657fc69828dcf3219a Mon Sep 17 00:00:00 2001 From: Adam Procter <adamprocter@researchnot.es> Date: Fri, 20 Nov 2020 13:04:58 +0000 Subject: [PATCH] bug fix you can no longer try and join a microcosm without a name set, which would lead to no data being stored --- app/src/components/OnBoard.vue | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/app/src/components/OnBoard.vue b/app/src/components/OnBoard.vue index 082c6a1..8ecd9e1 100644 --- a/app/src/components/OnBoard.vue +++ b/app/src/components/OnBoard.vue @@ -203,9 +203,13 @@ export default { lower = spaces.split(' ').join('') result = lower.split('-').join('') - this.$store.dispatch('createMicrocosm', result) - localStorage.setItem('mylastMicrocosm', result) - this.microcosm = true + if (this.clientid != '') { + this.$store.dispatch('createMicrocosm', result) + localStorage.setItem('mylastMicrocosm', result) + this.microcosm = true + } else { + // console.log('name not set') + } }, setClient() { var result @@ -233,7 +237,11 @@ export default { }, letsGo() { - this.$emit('client-added') + if (this.clientid != '') { + this.$emit('client-added') + } else { + //console.log('name not set ') + } }, focusInput() { -- GitLab