Skip to content

Commit e1a1675

Browse files
authored
Also add check to src
1 parent e7e94a5 commit e1a1675

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Chartjs/assets/src/controller.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ export default class extends Controller {
2929
private chart: Chart | null = null;
3030

3131
connect() {
32+
if(Chart.getChart(this.element)) {
33+
// Chart is already connected
34+
return;
35+
}
36+
3237
if (!isChartInitialized) {
3338
isChartInitialized = true;
3439
this.dispatchEvent('init', {

0 commit comments

Comments
 (0)