From d51f91f54be59826d2b0d08c4de877ad6459d44e Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Wed, 9 Jan 2019 13:56:15 +0100 Subject: [PATCH] unregister event listener correctly --- .../plugins/datasource/stackdriver/components/QueryEditor.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/plugins/datasource/stackdriver/components/QueryEditor.tsx b/public/app/plugins/datasource/stackdriver/components/QueryEditor.tsx index 52c77abc879..3d3f12ec57d 100644 --- a/public/app/plugins/datasource/stackdriver/components/QueryEditor.tsx +++ b/public/app/plugins/datasource/stackdriver/components/QueryEditor.tsx @@ -62,8 +62,8 @@ export class QueryEditor extends React.Component { } componentWillUnmount() { - this.props.events.off('data-received'); - this.props.events.off('data-error'); + this.props.events.off('data-received', this.onDataReceived); + this.props.events.off('data-error', this.onDataError); } onDataReceived(dataList) {