unregister event listener correctly

This commit is contained in:
Erik Sundell 2019-01-09 13:56:15 +01:00
parent ae50d83608
commit d51f91f54b

View File

@ -62,8 +62,8 @@ export class QueryEditor extends React.Component<Props, State> {
} }
componentWillUnmount() { componentWillUnmount() {
this.props.events.off('data-received'); this.props.events.off('data-received', this.onDataReceived);
this.props.events.off('data-error'); this.props.events.off('data-error', this.onDataError);
} }
onDataReceived(dataList) { onDataReceived(dataList) {