1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-19 05:22:13 +03:00

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; event.origin = event.originalEvent.origin;
} }
if (this.state.widgetUrl.indexOf(event.origin) === -1) { if (!this.state.widgetUrl.startsWith(event.origin)) {
return; return;
} }