From 7244eebc311081bd6b8d110eeef1593fe1ab32da Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 4 Oct 2019 18:33:38 +0200 Subject: [PATCH] Make sure we have email on registerAccount page Closes #179 Signed-off-by: Thomas Citharel --- js/src/views/Account/Register.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/src/views/Account/Register.vue b/js/src/views/Account/Register.vue index 0fa72dd87..1212f572b 100644 --- a/js/src/views/Account/Register.vue +++ b/js/src/views/Account/Register.vue @@ -88,6 +88,13 @@ export default class Register extends Vue { validationSent: boolean = false; sendingValidation: boolean = false; + async mounted() { + // Make sure no one goes to this page if we don't want to + if (!this.email) { + await this.$router.replace({ name: RouteName.PAGE_NOT_FOUND }); + } + } + async submit() { try { this.sendingValidation = true;