mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
=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) {
|
if (this._chart) {
|
||||||
this._chart.destroy();
|
this._chart.destroy();
|
||||||
|
this._chart = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
loadScript("/javascripts/Chart.min.js").then(() => {
|
loadScript("/javascripts/Chart.min.js").then(() => {
|
||||||
|
if (this._chart) {
|
||||||
|
this._chart.destroy();
|
||||||
|
}
|
||||||
this._chart = new window.Chart(context, this._buildChartConfig(data));
|
this._chart = new window.Chart(context, this._buildChartConfig(data));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user