Fix duplicate event registration.

This commit is contained in:
Richard Lewis 2018-01-08 13:40:33 +00:00
parent 5df9a01e64
commit 0577316c86

View file

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