Check for errors before maping them

This commit is contained in:
Douglas Barone 2021-01-12 10:05:29 -04:00
parent 0d7e4e83d1
commit af389b145d

View File

@ -164,7 +164,7 @@ export default {
this.basicUser = response.data.basicUser
this.step = 2
} catch (e) {
this.errors = e.graphQLErrors.map(e => e.message)
this.errors = e.graphQLErrors?.map(e => e.message)
} finally {
this.loading = false
}
@ -197,7 +197,7 @@ export default {
const next = this.$route.params.next
await this.$router.push(next ? next : '/')
} catch (e) {
this.errors = e.graphQLErrors.map(e => e.message)
this.errors = e.graphQLErrors?.map(e => e.message)
} finally {
this.loading = false
}