diff --git a/src/WidgetMessaging.js b/src/WidgetMessaging.js index 24f691233d..8708727c0f 100644 --- a/src/WidgetMessaging.js +++ b/src/WidgetMessaging.js @@ -195,7 +195,7 @@ function onMessage(event) { // Event origin is empty string if undefined if ( event.origin.length === 0 || - trustedEndpoint(event.origin) || + !trustedEndpoint(event.origin) || event.data.api !== "widget" || !event.data.widgetId ) {