Skip to content

Commit

Permalink
Fix chart not able to setup because canvas in use
Browse files Browse the repository at this point in the history
  • Loading branch information
bramkragten committed Sep 25, 2023
1 parent 362d950 commit 721e2f6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/chart/ha-chart-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export class HaChartBase extends LitElement {
public connectedCallback() {
super.connectedCallback();
if (this.hasUpdated) {
this._releaseCanvas();
this._setupChart();
}
}
Expand Down Expand Up @@ -110,7 +111,7 @@ export class HaChartBase extends LitElement {
return;
}
if (changedProps.has("plugins") || changedProps.has("chartType")) {
this.chart.destroy();
this._releaseCanvas();
this._setupChart();
return;
}
Expand Down

0 comments on commit 721e2f6

Please sign in to comment.