Greetings, I was redirected here from a support ticket for our freshdesk account.
There is a logic error in the embed code for the support widget in the “message” event handler. In the embedding code, the widget attempts to check the validity of this[s]
before calling it. However, it only checks that s
is truthy OR this[s]
is a function. It needs to ensure that s
is truthy AND that this[s]
is a function to behave as is intended here.
handleMessage: function(e) {
var t = e.data
, s = t.eventName
, n = t.data;
(s || "function" == typeof this[s]) && this[s](n)
},
This issue is causing errors on our site where the widget is deployed because it is overzealously grabbing unrelated "message"
events to the window.