Fix duplicate event registration.

pull/21833/head
Richard Lewis 2018-01-08 13:40:33 +00:00
parent 5df9a01e64
commit 0577316c86
1 changed files with 1 additions and 2 deletions

View File

@ -171,6 +171,7 @@ export default React.createClass({
componentDidMount() { componentDidMount() {
// Legacy Jitsi widget messaging -- TODO replace this with standard widget // Legacy Jitsi widget messaging -- TODO replace this with standard widget
// postMessaging API // postMessaging API
dis.register(this._onAction);
window.addEventListener('message', this._onMessage, false); window.addEventListener('message', this._onMessage, false);
}, },
@ -346,8 +347,6 @@ export default React.createClass({
console.log("Failed to get widget capabilities", this.widgetId, err); console.log("Failed to get widget capabilities", this.widgetId, err);
}); });
this.setState({loading: false}); this.setState({loading: false});
dis.register(this._onAction);
}, },
_onAction(payload) { _onAction(payload) {