From 81f7f805fa9d938c79a538c0ed3a74dad2bc1e48 Mon Sep 17 00:00:00 2001 From: Richard Lewis Date: Fri, 1 Dec 2017 16:31:39 +0000 Subject: [PATCH] Fix check --- src/WidgetMessaging.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ) {