Skip to content

Commit 0f94046

Browse files
Update src/Chartjs/assets/src/controller.ts
Co-authored-by: Evert Harmeling <evertharmeling@gmail.com>
1 parent ce71163 commit 0f94046

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Chartjs/assets/src/controller.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
import { Controller } from '@hotwired/stimulus';
1313
import { Chart, registerables } from 'chart.js';
1414

15-
Chart.register(...registerables);
15+
// ChartJs 3.x
16+
if (registerables != undefined) {
17+
Chart.register(...registerables);
18+
}
1619

1720
let isChartInitialized = false;
1821

0 commit comments

Comments
 (0)