AppTile: Test if widgetUrl startsWith instead of has a substring

The event origin should be at the beginning of the URL.
This commit is contained in:
Robert Swain 2017-09-25 17:14:25 +02:00
parent 6e49926228
commit 24de01e21d

View file

@ -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;
}