Skip to content

Commit a5c0204

Browse files
committed
Fix typescript error and build dist files
1 parent e1a1675 commit a5c0204

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/Chartjs/assets/dist/controller.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ class default_1 extends Controller {
1111
this.chart = null;
1212
}
1313
connect() {
14-
if(Chart.getChart(this.element)) {
15-
// Chart is already connected
14+
if (this.element instanceof HTMLCanvasElement && Chart.getChart(this.element)) {
1615
return;
1716
}
1817
if (!isChartInitialized) {

src/Chartjs/assets/src/controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default class extends Controller {
2929
private chart: Chart | null = null;
3030

3131
connect() {
32-
if(Chart.getChart(this.element)) {
32+
if (this.element instanceof HTMLCanvasElement && Chart.getChart(this.element)) {
3333
// Chart is already connected
3434
return;
3535
}

0 commit comments

Comments
 (0)