From 24de01e21de03d8abdcc112ea67d43a581c72e5a Mon Sep 17 00:00:00 2001 From: Robert Swain Date: Mon, 25 Sep 2017 17:14:25 +0200 Subject: [PATCH] AppTile: Test if widgetUrl startsWith instead of has a substring The event origin should be at the beginning of the URL. --- src/components/views/elements/AppTile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/elements/AppTile.js b/src/components/views/elements/AppTile.js index 2e6a4dab2d..f4e4702989 100644 --- a/src/components/views/elements/AppTile.js +++ b/src/components/views/elements/AppTile.js @@ -143,7 +143,7 @@ export default React.createClass({ event.origin = event.originalEvent.origin; } - if (this.state.widgetUrl.indexOf(event.origin) === -1) { + if (!this.state.widgetUrl.startsWith(event.origin)) { return; }