Skip to content

Commit

Permalink
adding try catch
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristina Mariscal committed Mar 12, 2024
1 parent 3d4a29e commit 979c465
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/javascript/widget/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,12 @@ export default {
async startConversation() {
const ref = new URLSearchParams(window.location.search).get('referral');
if (ref) {
this.clearConversations();
await setCustomAttributes({"ref": ref});
try {
await setCustomAttributes({"ref": ref});
this.clearConversations();
} catch (e) {
// Ignore error
}
} else if (this.preChatFormEnabled && !this.conversationSize) {
return this.replaceRoute('prechat-form');
}
Expand Down

0 comments on commit 979c465

Please sign in to comment.