mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Grafana UI: Unbind graph only if initialised (#25762)
This commit is contained in:
parent
46df05fd9d
commit
1bde4de827
@ -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 } }) => {
|
||||
|
Loading…
Reference in New Issue
Block a user