Commit 1bde4de8 by Alex Khomenko Committed by GitHub

Grafana UI: Unbind graph only if initialised (#25762)

parent 46df05fd
......@@ -70,7 +70,9 @@ export class Graph extends PureComponent<GraphProps, GraphState> {
}
componentWillUnmount() {
this.$element.unbind('plotselected', this.onPlotSelected);
if (this.$element) {
this.$element.unbind('plotselected', this.onPlotSelected);
}
}
onPlotSelected = (event: JQueryEventObject, ranges: { xaxis: { from: number; to: number } }) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment