diff --git a/src/modules/appointment/components/wt-omni-widget-appointment.vue b/src/modules/appointment/components/wt-omni-widget-appointment.vue index 4dd304b..be90fbb 100644 --- a/src/modules/appointment/components/wt-omni-widget-appointment.vue +++ b/src/modules/appointment/components/wt-omni-widget-appointment.vue @@ -43,14 +43,13 @@ export default { }, async created() { try { - (await reCAPTCHify(() => { - this.loadAppointmentData(); - }))(); + await reCAPTCHify(this.loadAppointmentData); } catch (err) { eventBus.$emit('snack', { type: 'error', text: this.$t('captcha.error.text'), }); + throw err; } }, }; diff --git a/src/modules/chat/components/wt-omni-widget-chat-wrapper.vue b/src/modules/chat/components/wt-omni-widget-chat-wrapper.vue index d7fa0d1..e04a315 100644 --- a/src/modules/chat/components/wt-omni-widget-chat-wrapper.vue +++ b/src/modules/chat/components/wt-omni-widget-chat-wrapper.vue @@ -58,7 +58,7 @@ export default { async initSession() { if (this.client) return; // prevent reinitialization, but should be refactored try { - (await reCAPTCHify(() => { + await reCAPTCHify(() => { const workerSupport = false && !!window.SharedWorker && !!window.BroadcastChannel; // FIXME const messageClient = new MessageClient({ url: this.config.chat.url, @@ -71,7 +71,7 @@ export default { await this.closeSession(); delete e.returnValue; // page will always reload }); - }))(); + }); } catch (err) { eventBus.$emit('snack', { type: 'error',