Issue #3620588: Drop weight -1 from charts_chartjs.js so it loads after its dependency charts/global
Fixes https://www.drupal.org/project/charts/issues/3620588
js/charts_chartjs.js had an explicit weight: -1 while its dependency charts/global (js/charts.js) keeps the default weight 0. Drupal orders JavaScript by weight and only preserves dependency order between files of equal weight, so charts_chartjs.js was emitted before charts.js.
On a normal page load defer masks this, but with BigPipe/AJAX both files are added dynamically in document order and an intermediate Drupal.attachBehaviors() runs chartsChartjs.attach before Drupal.Charts exists:
Uncaught TypeError: Cannot read properties of undefined (reading 'Contents')
at Object.attach (modules/charts_chartjs/js/charts_chartjs.js:21)Dropping the weight lets the file follow its dependency. Verified: order becomes charts.js (0.00013) before charts_chartjs.js (0.0003) and the error no longer occurs on pages with 7–9 BigPipe-loaded charts.