FIX: ensures chart parent element is still present before render (#8145)

This commit is contained in:
Joffrey JAFFEUX 2019-10-02 17:54:30 -04:00 committed by GitHub
parent 29659ef31e
commit 91dd6aacfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -33,6 +33,10 @@ export default Ember.Component.extend({
_scheduleChartRendering() {
Ember.run.schedule("afterRender", () => {
if (!this.element) {
return;
}
this._renderChart(
this.model,
this.element.querySelector(".chart-canvas")