From 613ac1203b0991f8be46b13f6dd3eb4e16eb06fe Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sat, 24 Oct 2020 17:32:27 +0200 Subject: [PATCH] Fix a few typescript issues in Interact.vue Signed-off-by: Thomas Citharel --- js/src/views/Interact.vue | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/js/src/views/Interact.vue b/js/src/views/Interact.vue index 1c018c6f4..b997ce8d8 100644 --- a/js/src/views/Interact.vue +++ b/js/src/views/Interact.vue @@ -27,12 +27,10 @@ import RouteName from "../router/name"; skip() { try { const url = this.$route.query.url as string; - new URL(url); - return false; + const uri = new URL(url); + return !(uri instanceof URL); } catch (e) { - if (e instanceof TypeError) { - return true; - } + return true; } }, async result({ data }) { @@ -42,7 +40,7 @@ import RouteName from "../router/name"; data.searchEvents.elements.length > 0 ) { const event = data.searchEvents.elements[0]; - return await this.$router.replace({ + await this.$router.replace({ name: RouteName.EVENT, params: { uuid: event.uuid }, });