From 3322e2f6bd220282ac00d678897408b4f5db1449 Mon Sep 17 00:00:00 2001 From: Alf Sebastian Houge Date: Wed, 6 Apr 2022 14:43:01 +0200 Subject: [PATCH] Don't redirect from import page on erro --- ui/src/router/views/import-drivvo.vue | 2 +- ui/src/router/views/import-fuelly.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/src/router/views/import-drivvo.vue b/ui/src/router/views/import-drivvo.vue index fb673d2..143b2d5 100644 --- a/ui/src/router/views/import-drivvo.vue +++ b/ui/src/router/views/import-drivvo.vue @@ -68,6 +68,7 @@ export default { duration: 3000, }) this.file = null + setTimeout(() => this.$router.push({ name: 'home' }), 1000) }) .catch((ex) => { this.$buefy.toast.open({ @@ -82,7 +83,6 @@ export default { }) .finally(() => { this.tryingToCreate = false - setTimeout(() => this.$router.push({ name: 'home' }), 1000) }) }, }, diff --git a/ui/src/router/views/import-fuelly.vue b/ui/src/router/views/import-fuelly.vue index 6b9e1a6..39fedfd 100644 --- a/ui/src/router/views/import-fuelly.vue +++ b/ui/src/router/views/import-fuelly.vue @@ -58,6 +58,7 @@ export default { duration: 3000, }) this.file = null + setTimeout(() => this.$router.push({ name: 'home' }), 1000) }) .catch((ex) => { this.$buefy.toast.open({ @@ -72,7 +73,6 @@ export default { }) .finally(() => { this.tryingToCreate = false - setTimeout(() => this.$router.push({ name: 'home' }), 1000) }) }, },