Freshdesk embedded widget does not check the validity of the event handler

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.

Hi @mbauman,

I understand you are using the Freshdesk helpdesk widget, not the Marketplace apps. Please correct me if my understanding is incorrect.

We do not have Freshdesk widget experts in our community yet.

It’s part of the Freshdesk product; the Freshdesk support should have helped you. Not sure why you were being redirected here.
Could you please share the link or ID for the support ticket you mentioned? I can follow up internally, reopen it, and help route it to the right team.