From 1d75ce095ade2f08119a8a006e90472f4b05aabe Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 11 Jun 2021 15:08:53 +0200 Subject: [PATCH] Fix events creation Signed-off-by: Thomas Citharel --- js/src/views/Event/Edit.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/js/src/views/Event/Edit.vue b/js/src/views/Event/Edit.vue index 0c769129a..94b83c491 100644 --- a/js/src/views/Event/Edit.vue +++ b/js/src/views/Event/Edit.vue @@ -703,10 +703,12 @@ export default class EditEvent extends Vue { position: "is-bottom-right", duration: 5000, }); - await this.$router.push({ - name: "Event", - params: { uuid: data.createEvent.uuid }, - }); + if (data?.createEvent) { + await this.$router.push({ + name: "Event", + params: { uuid: data.createEvent.uuid }, + }); + } } catch (err) { this.saving = false; console.error(err);