Send visibility only when changed, and messaging is available

This commit is contained in:
Luke Barnard 2018-05-11 18:06:58 +01:00
parent a419056040
commit 9c5c5e282b
2 changed files with 14 additions and 14 deletions

View file

@ -172,12 +172,7 @@ export default class AppTile extends React.Component {
componentDidUpdate() {
// Allow parents to access widget messaging
if (this.props.collectWidgetMessaging) {
this.props.collectWidgetMessaging(new Promise((resolve) => {
if (this.widgetMessaging) resolve(this.widgetMessaging);
// Expect this to be resolved later
this._exposeWidgetMessaging = resolve;
}));
this.props.collectWidgetMessaging(this.widgetMessaging);
}
}