diff --git a/src/digital-components/sierra-webchat/sierra-webchat.vue b/src/digital-components/sierra-webchat/sierra-webchat.vue index 9383efe37..0b4381411 100644 --- a/src/digital-components/sierra-webchat/sierra-webchat.vue +++ b/src/digital-components/sierra-webchat/sierra-webchat.vue @@ -45,12 +45,18 @@ export default { display: "corner", onLoad: () => this.openSierraChatModal(), onOpen: () => {}, - onClose: () => {if (!this.transferInProgress) {this.webchatGlobalNonpersistedState.showWebchatButton = true; this.transferInProgress = false;}}, - onTransfer: (transfer) => {this.transferInProgress = true; + onClose: () => { + if (!this.transferInProgress) { + this.webchatGlobalNonpersistedState.showWebchatButton = true; + this.transferInProgress = false; + } + }, + onTransfer: (transfer) => { + this.transferInProgress = true; window.dispatchEvent( - new CustomEvent("sierra-chat-transfer", { detail: transfer }) - ); - }, + new CustomEvent("sierra-chat-transfer", { detail: transfer }) + ); + }, }; }, getSierraContext() {