* Fix key error
* Remove redundant logging * Catch error
This commit is contained in:
parent
0fab905a2e
commit
5e6da4d758
2 changed files with 7 additions and 3 deletions
|
@ -41,7 +41,6 @@ export default class AppTile extends React.Component {
|
|||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
console.warn('AppTile constructor', props);
|
||||
this.state = this._getNewState(props);
|
||||
|
||||
this._onAction = this._onAction.bind(this);
|
||||
|
@ -218,8 +217,12 @@ export default class AppTile extends React.Component {
|
|||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
this.widgetMessaging.stopListening();
|
||||
this.widgetMessaging.removeEndpoint(this.props.id, this.props.url);
|
||||
try {
|
||||
this.widgetMessaging.stopListening();
|
||||
this.widgetMessaging.removeEndpoint(this.props.id, this.props.url);
|
||||
} catch (e) {
|
||||
console.error('Failed to stop listening for widgetMessaging events', e.message);
|
||||
}
|
||||
dis.unregister(this._onAction);
|
||||
window.removeEventListener('message', this._onMessage);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue