diff --git a/ui/app/components/line-chart.js b/ui/app/components/line-chart.js index 52c5de964..2998993cd 100644 --- a/ui/app/components/line-chart.js +++ b/ui/app/components/line-chart.js @@ -325,9 +325,11 @@ export default Component.extend(WindowResizable, { }, mountD3Elements() { - d3.select(this.element.querySelector('.x-axis')).call(this.get('xAxis')); - d3.select(this.element.querySelector('.y-axis')).call(this.get('yAxis')); - d3.select(this.element.querySelector('.y-gridlines')).call(this.get('yGridlines')); + if (!this.get('isDestroyed') && !this.get('isDestroying')) { + d3.select(this.element.querySelector('.x-axis')).call(this.get('xAxis')); + d3.select(this.element.querySelector('.y-axis')).call(this.get('yAxis')); + d3.select(this.element.querySelector('.y-gridlines')).call(this.get('yGridlines')); + } }, windowResizeHandler() {