From 9f3339240fc7335de89351a87c4bb8eb90d01121 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Wed, 6 Sep 2023 23:18:55 +0000 Subject: [PATCH] be a bit safer --- ui/src/App.vue | 8 ++++++-- ui/src/components/MultiModal.vue | 1 - 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ui/src/App.vue b/ui/src/App.vue index 9c1efab..566903a 100644 --- a/ui/src/App.vue +++ b/ui/src/App.vue @@ -73,8 +73,12 @@ export default class extends Vue { public abort_calendar_door(name: string, reason: unknown) { this.$refs.multi_modal.set_active(false); - if ((reason as AxiosError).response?.status == 401) { - alert("Nice try!") + if ( + (reason instanceof AxiosError) + && (reason.response !== undefined) + && (reason.response.status === 401) + ) { + alert("Netter Versuch!") } } } diff --git a/ui/src/components/MultiModal.vue b/ui/src/components/MultiModal.vue index d78a87a..a3825dd 100644 --- a/ui/src/components/MultiModal.vue +++ b/ui/src/components/MultiModal.vue @@ -41,7 +41,6 @@ export default class extends Vue { public show_progress() { this.progress = true; - this.image_src = ""; this.set_active(true); } }