We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 275b23e commit 96690c0Copy full SHA for 96690c0
src/Chartjs/assets/dist/controller.js
@@ -11,6 +11,10 @@ class default_1 extends Controller {
11
this.chart = null;
12
}
13
connect() {
14
+ if(Chart.getChart(this.element)) {
15
+ // Chart is already connected
16
+ return;
17
+ }
18
if (!isChartInitialized) {
19
isChartInitialized = true;
20
this.dispatchEvent('init', {
@@ -20,10 +24,6 @@ class default_1 extends Controller {
24
if (!(this.element instanceof HTMLCanvasElement)) {
21
25
throw new Error('Invalid element');
22
26
23
- if(Chart.getChart(this.element)) {
- // Chart is already connected
- return;
- }
27
const payload = this.viewValue;
28
if (Array.isArray(payload.options) && 0 === payload.options.length) {
29
payload.options = {};
0 commit comments