Skip to content

Commit

Permalink
Nuzhy/TRAH-5030/livechat trackjs error (#17882)
Browse files Browse the repository at this point in the history
* fix: trackjs error

* fix: trackjs error
  • Loading branch information
Nuzhy-Deriv authored Jan 7, 2025
1 parent 2be39cc commit 2b6cbe6
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ const LiveChat = observer(({ showPopover }: { showPopover?: boolean }) => {
// We will add a refactor after this
setInterval(() => {
if (fcAvailable || icAvailable) {
window.LiveChatWidget?.call('destroy');
if (window.LiveChatWidget && typeof window.LiveChatWidget.call === 'function') {
window.LiveChatWidget.call('destroy');
}
}
}, 10);

Expand Down

0 comments on commit 2b6cbe6

Please sign in to comment.