=handle chart loading concurrency issues
This commit is contained in:
parent
146f634c8f
commit
6ee0eae335
|
@ -110,9 +110,13 @@ export default Ember.Component.extend(AsyncReport, {
|
|||
|
||||
if (this._chart) {
|
||||
this._chart.destroy();
|
||||
this._chart = null;
|
||||
}
|
||||
|
||||
loadScript("/javascripts/Chart.min.js").then(() => {
|
||||
if (this._chart) {
|
||||
this._chart.destroy();
|
||||
}
|
||||
this._chart = new window.Chart(context, this._buildChartConfig(data));
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue