Skip to content

Commit

Permalink
Fix chat widget
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Naessens committed Oct 26, 2022
1 parent e508cb3 commit c86fa64
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions app/assets/javascripts/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -2336,6 +2336,11 @@
x.unload(),
w.unload()
},
syncDestroy: function() {
x.unload(),
w.unload(),
R.unloadWidget()
},
isOpen: function() {
return t.isOpened()
},
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/src/freshdesk/chat_widget_setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function flushFreshchat() {
// Navigating to another page
document.addEventListener("turbolinks:visit", function() {
if(window.fcWidget) {
window.fcWidget.destroy()
window.fcWidget.syncDestroy()
} else {
console.warn("No widget found!")
}
Expand Down

0 comments on commit c86fa64

Please sign in to comment.