Skip to content

Commit ac5145f

Browse files
committed
Fix typescript error and build dist files
1 parent bab862f commit ac5145f

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
@@ -27,7 +27,7 @@ export default class extends Controller {
2727
private chart: Chart | null = null;
2828

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

0 commit comments

Comments
 (0)