Skip to content

Commit

Permalink
fix: recaptchify usage [WTEL-4251]
Browse files Browse the repository at this point in the history
  • Loading branch information
dlohvinov committed Mar 13, 2024
1 parent b9499e1 commit 2dbc9a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
},
};
Expand Down
4 changes: 2 additions & 2 deletions src/modules/chat/components/wt-omni-widget-chat-wrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -71,7 +71,7 @@ export default {
await this.closeSession();
delete e.returnValue; // page will always reload
});
}))();
});
} catch (err) {
eventBus.$emit('snack', {
type: 'error',
Expand Down

0 comments on commit 2dbc9a3

Please sign in to comment.