Merge pull request #4837 from hashicorp/b-ui-d3-race-condition
UI: Guard against the line chart element already being destroyed
This commit is contained in:
commit
4e924c13b6
|
@ -325,9 +325,11 @@ export default Component.extend(WindowResizable, {
|
||||||
},
|
},
|
||||||
|
|
||||||
mountD3Elements() {
|
mountD3Elements() {
|
||||||
d3.select(this.element.querySelector('.x-axis')).call(this.get('xAxis'));
|
if (!this.get('isDestroyed') && !this.get('isDestroying')) {
|
||||||
d3.select(this.element.querySelector('.y-axis')).call(this.get('yAxis'));
|
d3.select(this.element.querySelector('.x-axis')).call(this.get('xAxis'));
|
||||||
d3.select(this.element.querySelector('.y-gridlines')).call(this.get('yGridlines'));
|
d3.select(this.element.querySelector('.y-axis')).call(this.get('yAxis'));
|
||||||
|
d3.select(this.element.querySelector('.y-gridlines')).call(this.get('yGridlines'));
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
windowResizeHandler() {
|
windowResizeHandler() {
|
||||||
|
|
Loading…
Reference in New Issue